text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
/**********************************************************
* This script provides syntax highlighting support for
* the Ntriples format.
* Ntriples format specification:
* http://www.w3.org/TR/rdf-testcases/#ntriples
***********************************************************/
/*
The following expression defines the defined ASF grammar transitions.
pre_subject ->
{
( writing_subject_uri | writing_bnode_uri )
-> pre_predicate
-> writing_predicate_uri
-> pre_object
-> writing_object_uri | writing_object_bnode |
(
writing_object_literal
-> writing_literal_lang | writing_literal_type
)
-> post_object
-> BEGIN
} otherwise {
-> ERROR
}
*/
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("ntriples", function() {
var Location = {
PRE_SUBJECT : 0,
WRITING_SUB_URI : 1,
WRITING_BNODE_URI : 2,
PRE_PRED : 3,
WRITING_PRED_URI : 4,
PRE_OBJ : 5,
WRITING_OBJ_URI : 6,
WRITING_OBJ_BNODE : 7,
WRITING_OBJ_LITERAL : 8,
WRITING_LIT_LANG : 9,
WRITING_LIT_TYPE : 10,
POST_OBJ : 11,
ERROR : 12
};
function transitState(currState, c) {
var currLocation = currState.location;
var ret;
// Opening.
if (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI;
else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI;
else if(currLocation == Location.PRE_PRED && c == '<') ret = Location.WRITING_PRED_URI;
else if(currLocation == Location.PRE_OBJ && c == '<') ret = Location.WRITING_OBJ_URI;
else if(currLocation == Location.PRE_OBJ && c == '_') ret = Location.WRITING_OBJ_BNODE;
else if(currLocation == Location.PRE_OBJ && c == '"') ret = Location.WRITING_OBJ_LITERAL;
// Closing.
else if(currLocation == Location.WRITING_SUB_URI && c == '>') ret = Location.PRE_PRED;
else if(currLocation == Location.WRITING_BNODE_URI && c == ' ') ret = Location.PRE_PRED;
else if(currLocation == Location.WRITING_PRED_URI && c == '>') ret = Location.PRE_OBJ;
else if(currLocation == Location.WRITING_OBJ_URI && c == '>') ret = Location.POST_OBJ;
else if(currLocation == Location.WRITING_OBJ_BNODE && c == ' ') ret = Location.POST_OBJ;
else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ;
else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ;
else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ;
// Closing typed and language literal.
else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG;
else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE;
// Spaces.
else if( c == ' ' &&
(
currLocation == Location.PRE_SUBJECT ||
currLocation == Location.PRE_PRED ||
currLocation == Location.PRE_OBJ ||
currLocation == Location.POST_OBJ
)
) ret = currLocation;
// Reset.
else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;
// Error
else ret = Location.ERROR;
currState.location=ret;
}
return {
startState: function() {
return {
location : Location.PRE_SUBJECT,
uris : [],
anchors : [],
bnodes : [],
langs : [],
types : []
};
},
token: function(stream, state) {
var ch = stream.next();
if(ch == '<') {
transitState(state, ch);
var parsedURI = '';
stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} );
state.uris.push(parsedURI);
if( stream.match('#', false) ) return 'variable';
stream.next();
transitState(state, '>');
return 'variable';
}
if(ch == '#') {
var parsedAnchor = '';
stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;});
state.anchors.push(parsedAnchor);
return 'variable-2';
}
if(ch == '>') {
transitState(state, '>');
return 'variable';
}
if(ch == '_') {
transitState(state, ch);
var parsedBNode = '';
stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;});
state.bnodes.push(parsedBNode);
stream.next();
transitState(state, ' ');
return 'builtin';
}
if(ch == '"') {
transitState(state, ch);
stream.eatWhile( function(c) { return c != '"'; } );
stream.next();
if( stream.peek() != '@' && stream.peek() != '^' ) {
transitState(state, '"');
}
return 'string';
}
if( ch == '@' ) {
transitState(state, '@');
var parsedLang = '';
stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;});
state.langs.push(parsedLang);
stream.next();
transitState(state, ' ');
return 'string-2';
}
if( ch == '^' ) {
stream.next();
transitState(state, '^');
var parsedType = '';
stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} );
state.types.push(parsedType);
stream.next();
transitState(state, '>');
return 'variable';
}
if( ch == ' ' ) {
transitState(state, ch);
}
if( ch == '.' ) {
transitState(state, ch);
}
}
};
});
CodeMirror.defineMIME("text/n-triples", "ntriples");
});
| Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/mode/ntriples/ntriples.js/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/mode/ntriples/ntriples.js",
"repo_id": "Humsen",
"token_count": 3158
} | 45 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "ruby");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("divide_equal_operator",
"[variable bar] [operator /=] [variable foo]");
MT("divide_equal_operator_no_spacing",
"[variable foo][operator /=][number 42]");
})();
| Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/mode/ruby/test.js/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/mode/ruby/test.js",
"repo_id": "Humsen",
"token_count": 164
} | 46 |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("velocity", function() {
function parseWords(str) {
var obj = {}, words = str.split(" ");
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
return obj;
}
var keywords = parseWords("#end #else #break #stop #[[ #]] " +
"#{end} #{else} #{break} #{stop}");
var functions = parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate " +
"#{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}");
var specials = parseWords("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent");
var isOperatorChar = /[+\-*&%=<>!?:\/|]/;
function chain(stream, state, f) {
state.tokenize = f;
return f(stream, state);
}
function tokenBase(stream, state) {
var beforeParams = state.beforeParams;
state.beforeParams = false;
var ch = stream.next();
// start of unparsed string?
if ((ch == "'") && state.inParams) {
state.lastTokenWasBuiltin = false;
return chain(stream, state, tokenString(ch));
}
// start of parsed string?
else if ((ch == '"')) {
state.lastTokenWasBuiltin = false;
if (state.inString) {
state.inString = false;
return "string";
}
else if (state.inParams)
return chain(stream, state, tokenString(ch));
}
// is it one of the special signs []{}().,;? Seperator?
else if (/[\[\]{}\(\),;\.]/.test(ch)) {
if (ch == "(" && beforeParams)
state.inParams = true;
else if (ch == ")") {
state.inParams = false;
state.lastTokenWasBuiltin = true;
}
return null;
}
// start of a number value?
else if (/\d/.test(ch)) {
state.lastTokenWasBuiltin = false;
stream.eatWhile(/[\w\.]/);
return "number";
}
// multi line comment?
else if (ch == "#" && stream.eat("*")) {
state.lastTokenWasBuiltin = false;
return chain(stream, state, tokenComment);
}
// unparsed content?
else if (ch == "#" && stream.match(/ *\[ *\[/)) {
state.lastTokenWasBuiltin = false;
return chain(stream, state, tokenUnparsed);
}
// single line comment?
else if (ch == "#" && stream.eat("#")) {
state.lastTokenWasBuiltin = false;
stream.skipToEnd();
return "comment";
}
// variable?
else if (ch == "$") {
stream.eatWhile(/[\w\d\$_\.{}]/);
// is it one of the specials?
if (specials && specials.propertyIsEnumerable(stream.current())) {
return "keyword";
}
else {
state.lastTokenWasBuiltin = true;
state.beforeParams = true;
return "builtin";
}
}
// is it a operator?
else if (isOperatorChar.test(ch)) {
state.lastTokenWasBuiltin = false;
stream.eatWhile(isOperatorChar);
return "operator";
}
else {
// get the whole word
stream.eatWhile(/[\w\$_{}@]/);
var word = stream.current();
// is it one of the listed keywords?
if (keywords && keywords.propertyIsEnumerable(word))
return "keyword";
// is it one of the listed functions?
if (functions && functions.propertyIsEnumerable(word) ||
(stream.current().match(/^#@?[a-z0-9_]+ *$/i) && stream.peek()=="(") &&
!(functions && functions.propertyIsEnumerable(word.toLowerCase()))) {
state.beforeParams = true;
state.lastTokenWasBuiltin = false;
return "keyword";
}
if (state.inString) {
state.lastTokenWasBuiltin = false;
return "string";
}
if (stream.pos > word.length && stream.string.charAt(stream.pos-word.length-1)=="." && state.lastTokenWasBuiltin)
return "builtin";
// default: just a "word"
state.lastTokenWasBuiltin = false;
return null;
}
}
function tokenString(quote) {
return function(stream, state) {
var escaped = false, next, end = false;
while ((next = stream.next()) != null) {
if ((next == quote) && !escaped) {
end = true;
break;
}
if (quote=='"' && stream.peek() == '$' && !escaped) {
state.inString = true;
end = true;
break;
}
escaped = !escaped && next == "\\";
}
if (end) state.tokenize = tokenBase;
return "string";
};
}
function tokenComment(stream, state) {
var maybeEnd = false, ch;
while (ch = stream.next()) {
if (ch == "#" && maybeEnd) {
state.tokenize = tokenBase;
break;
}
maybeEnd = (ch == "*");
}
return "comment";
}
function tokenUnparsed(stream, state) {
var maybeEnd = 0, ch;
while (ch = stream.next()) {
if (ch == "#" && maybeEnd == 2) {
state.tokenize = tokenBase;
break;
}
if (ch == "]")
maybeEnd++;
else if (ch != " ")
maybeEnd = 0;
}
return "meta";
}
// Interface
return {
startState: function() {
return {
tokenize: tokenBase,
beforeParams: false,
inParams: false,
inString: false,
lastTokenWasBuiltin: false
};
},
token: function(stream, state) {
if (stream.eatSpace()) return null;
return state.tokenize(stream, state);
},
blockCommentStart: "#*",
blockCommentEnd: "*#",
lineComment: "##",
fold: "velocity"
};
});
CodeMirror.defineMIME("text/velocity", "velocity");
});
| Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/mode/velocity/velocity.js/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/mode/velocity/velocity.js",
"repo_id": "Humsen",
"token_count": 3606
} | 47 |
/*
Name: Base16 Default Light
Author: Chris Kempson (http://chriskempson.com)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
.cm-s-base16-light.CodeMirror ::selection { background: #e0e0e0; }
.cm-s-base16-light.CodeMirror ::-moz-selection { background: #e0e0e0; }
.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}
.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}
.cm-s-base16-light span.cm-comment {color: #8f5536;}
.cm-s-base16-light span.cm-atom {color: #aa759f;}
.cm-s-base16-light span.cm-number {color: #aa759f;}
.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}
.cm-s-base16-light span.cm-keyword {color: #ac4142;}
.cm-s-base16-light span.cm-string {color: #f4bf75;}
.cm-s-base16-light span.cm-variable {color: #90a959;}
.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}
.cm-s-base16-light span.cm-def {color: #d28445;}
.cm-s-base16-light span.cm-bracket {color: #202020;}
.cm-s-base16-light span.cm-tag {color: #ac4142;}
.cm-s-base16-light span.cm-link {color: #aa759f;}
.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}
.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}
.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
| Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/theme/base16-light.css/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/theme/base16-light.css",
"repo_id": "Humsen",
"token_count": 784
} | 48 |
/*
Name: Paraíso (Light)
Author: Jan T. Sott
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
*/
.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
.cm-s-paraiso-light.CodeMirror ::selection { background: #b9b6b0; }
.cm-s-paraiso-light.CodeMirror ::-moz-selection { background: #b9b6b0; }
.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}
.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}
.cm-s-paraiso-light span.cm-comment {color: #e96ba8;}
.cm-s-paraiso-light span.cm-atom {color: #815ba4;}
.cm-s-paraiso-light span.cm-number {color: #815ba4;}
.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;}
.cm-s-paraiso-light span.cm-keyword {color: #ef6155;}
.cm-s-paraiso-light span.cm-string {color: #fec418;}
.cm-s-paraiso-light span.cm-variable {color: #48b685;}
.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;}
.cm-s-paraiso-light span.cm-def {color: #f99b15;}
.cm-s-paraiso-light span.cm-bracket {color: #41323f;}
.cm-s-paraiso-light span.cm-tag {color: #ef6155;}
.cm-s-paraiso-light span.cm-link {color: #815ba4;}
.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;}
.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;}
.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
| Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/theme/paraiso-light.css/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/editormd/lib/codemirror/theme/paraiso-light.css",
"repo_id": "Humsen",
"token_count": 789
} | 49 |
/*!
* Image (upload) dialog plugin for Editor.md
*
* @file image-dialog.js
* @author pandao
* @version 1.3.4
* @updateTime 2015-06-09
* {@link https://github.com/pandao/editor.md}
* @license MIT
*/
(function() {
var factory = function (exports) {
var pluginName = "image-dialog";
exports.fn.imageDialog = function() {
var _this = this;
var cm = this.cm;
var lang = this.lang;
var editor = this.editor;
var settings = this.settings;
var cursor = cm.getCursor();
var selection = cm.getSelection();
var imageLang = lang.dialog.image;
var classPrefix = this.classPrefix;
var iframeName = classPrefix + "image-iframe";
var dialogName = classPrefix + pluginName, dialog;
cm.focus();
var loading = function(show) {
var _loading = dialog.find("." + classPrefix + "dialog-mask");
_loading[(show) ? "show" : "hide"]();
};
if (editor.find("." + dialogName).length < 1)
{
var guid = (new Date).getTime();
var action = settings.imageUploadURL + (settings.imageUploadURL.indexOf("?") >= 0 ? "&" : "?") + "guid=" + guid;
if (settings.crossDomainUpload)
{
action += "&callback=" + settings.uploadCallbackURL + "&dialog_id=editormd-image-dialog-" + guid;
}
var dialogContent = ( (settings.imageUpload) ? "<form action=\"" + action +"\" target=\"" + iframeName + "\" method=\"post\" enctype=\"multipart/form-data\" class=\"" + classPrefix + "form\">" : "<div class=\"" + classPrefix + "form\">" ) +
( (settings.imageUpload) ? "<iframe name=\"" + iframeName + "\" id=\"" + iframeName + "\" guid=\"" + guid + "\"></iframe>" : "" ) +
"<label>" + imageLang.url + "</label>" +
"<input type=\"text\" data-url />" + (function(){
return (settings.imageUpload) ? "<div class=\"" + classPrefix + "file-input\">" +
"<input type=\"file\" name=\"" + classPrefix + "image-file\" accept=\"image/*\" />" +
"<input type=\"submit\" value=\"" + imageLang.uploadButton + "\" />" +
"</div>" : "";
})() +
"<br/>" +
"<label>" + imageLang.alt + "</label>" +
"<input type=\"text\" value=\"" + selection + "\" data-alt />" +
"<br/>" +
"<label>" + imageLang.link + "</label>" +
"<input type=\"text\" value=\"http://\" data-link />" +
"<br/>" +
( (settings.imageUpload) ? "</form>" : "</div>");
//var imageFooterHTML = "<button class=\"" + classPrefix + "btn " + classPrefix + "image-manager-btn\" style=\"float:left;\">" + imageLang.managerButton + "</button>";
dialog = this.createDialog({
title : imageLang.title,
width : (settings.imageUpload) ? 465 : 380,
height : 254,
name : dialogName,
content : dialogContent,
mask : settings.dialogShowMask,
drag : settings.dialogDraggable,
lockScreen : settings.dialogLockScreen,
maskStyle : {
opacity : settings.dialogMaskOpacity,
backgroundColor : settings.dialogMaskBgColor
},
buttons : {
enter : [lang.buttons.enter, function() {
var url = this.find("[data-url]").val();
var alt = this.find("[data-alt]").val();
var link = this.find("[data-link]").val();
if (url === "")
{
alert(imageLang.imageURLEmpty);
return false;
}
var altAttr = (alt !== "") ? " \"" + alt + "\"" : "";
if (link === "" || link === "http://")
{
cm.replaceSelection("");
}
else
{
cm.replaceSelection("[](" + link + altAttr + ")");
}
if (alt === "") {
cm.setCursor(cursor.line, cursor.ch + 2);
}
this.hide().lockScreen(false).hideMask();
return false;
}],
cancel : [lang.buttons.cancel, function() {
this.hide().lockScreen(false).hideMask();
return false;
}]
}
});
dialog.attr("id", classPrefix + "image-dialog-" + guid);
if (!settings.imageUpload) {
return ;
}
var fileInput = dialog.find("[name=\"" + classPrefix + "image-file\"]");
fileInput.bind("change", function() {
var fileName = fileInput.val();
var isImage = new RegExp("(\\.(" + settings.imageFormats.join("|") + "))$"); // /(\.(webp|jpg|jpeg|gif|bmp|png))$/
if (fileName === "")
{
alert(imageLang.uploadFileEmpty);
return false;
}
if (!isImage.test(fileName))
{
alert(imageLang.formatNotAllowed + settings.imageFormats.join(", "));
return false;
}
loading(true);
var submitHandler = function() {
var uploadIframe = document.getElementById(iframeName);
uploadIframe.onload = function() {
loading(false);
var body = (uploadIframe.contentWindow ? uploadIframe.contentWindow : uploadIframe.contentDocument).document.body;
var json = (body.innerText) ? body.innerText : ( (body.textContent) ? body.textContent : null);
json = (typeof JSON.parse !== "undefined") ? JSON.parse(json) : eval("(" + json + ")");
if(!settings.crossDomainUpload)
{
if (json.success === 1)
{
dialog.find("[data-url]").val(json.url);
}
else
{
alert(json.message);
}
}
return false;
};
};
dialog.find("[type=\"submit\"]").bind("click", submitHandler).trigger("click");
});
}
dialog = editor.find("." + dialogName);
dialog.find("[type=\"text\"]").val("");
dialog.find("[type=\"file\"]").val("");
dialog.find("[data-link]").val("http://");
this.dialogShowMask(dialog);
this.dialogLockScreen();
dialog.show();
};
};
// CommonJS/Node.js
if (typeof require === "function" && typeof exports === "object" && typeof module === "object")
{
module.exports = factory;
}
else if (typeof define === "function") // AMD/CMD/Sea.js
{
if (define.amd) { // for Require.js
define(["editormd"], function(editormd) {
factory(editormd);
});
} else { // for Sea.js
define(function(require) {
var editormd = require("./../../editormd");
factory(editormd);
});
}
}
else
{
factory(window.editormd);
}
})();
| Humsen/web/web-mobile/WebContent/plugins/editormd/plugins/image-dialog/image-dialog.js/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/editormd/plugins/image-dialog/image-dialog.js",
"repo_id": "Humsen",
"token_count": 5046
} | 50 |
/*
http://www.JSON.org/json2.js
2011-02-23
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
NOT CONTROL.
This file creates a global JSON object containing two methods: stringify
and parse.
JSON.stringify(value, replacer, space)
value any JavaScript value, usually an object or array.
replacer an optional parameter that determines how object
values are stringified for objects. It can be a
function or an array of strings.
space an optional parameter that specifies the indentation
of nested structures. If it is omitted, the text will
be packed without extra whitespace. If it is a number,
it will specify the number of spaces to indent at each
level. If it is a string (such as '\t' or ' '),
it contains the characters used to indent at each level.
This method produces a JSON text from a JavaScript value.
When an object value is found, if the object contains a toJSON
method, its toJSON method will be called and the result will be
stringified. A toJSON method does not serialize: it returns the
value represented by the name/value pair that should be serialized,
or undefined if nothing should be serialized. The toJSON method
will be passed the key associated with the value, and this will be
bound to the value
For example, this would serialize Dates as ISO strings.
Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
You can provide an optional replacer method. It will be passed the
key and value of each member, with this bound to the containing
object. The value that is returned from your method will be
serialized. If your method returns undefined, then the member will
be excluded from the serialization.
If the replacer parameter is an array of strings, then it will be
used to select the members to be serialized. It filters the results
such that only members with keys listed in the replacer array are
stringified.
Values that do not have JSON representations, such as undefined or
functions, will not be serialized. Such values in objects will be
dropped; in arrays they will be replaced with null. You can use
a replacer function to replace those with JSON values.
JSON.stringify(undefined) returns undefined.
The optional space parameter produces a stringification of the
value that is filled with line breaks and indentation to make it
easier to read.
If the space parameter is a non-empty string, then that string will
be used for indentation. If the space parameter is a number, then
the indentation will be that many spaces.
Example:
text = JSON.stringify(['e', {pluribus: 'unum'}]);
// text is '["e",{"pluribus":"unum"}]'
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
text = JSON.stringify([new Date()], function (key, value) {
return this[key] instanceof Date ?
'Date(' + this[key] + ')' : value;
});
// text is '["Date(---current time---)"]'
JSON.parse(text, reviver)
This method parses a JSON text to produce an object or array.
It can throw a SyntaxError exception.
The optional reviver parameter is a function that can filter and
transform the results. It receives each of the keys and values,
and its return value is used instead of the original value.
If it returns what it received, then the structure is not modified.
If it returns undefined then the member is deleted.
Example:
// Parse the text. Values that look like ISO date strings will
// be converted to Date objects.
myData = JSON.parse(text, function (key, value) {
var a;
if (typeof value === 'string') {
a =
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
if (a) {
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+a[5], +a[6]));
}
}
return value;
});
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
var d;
if (typeof value === 'string' &&
value.slice(0, 5) === 'Date(' &&
value.slice(-1) === ')') {
d = new Date(value.slice(5, -1));
if (d) {
return d;
}
}
return value;
});
This is a reference implementation. You are free to copy, modify, or
redistribute.
*/
/*jslint evil: true, strict: false, regexp: false */
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
lastIndex, length, parse, prototype, push, replace, slice, stringify,
test, toJSON, toString, valueOf
*/
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
var JSON;
if (!JSON) {
JSON = {};
}
(function () {
"use strict";
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
if (typeof Date.prototype.toJSON !== 'function') {
Date.prototype.toJSON = function (key) {
return isFinite(this.valueOf()) ?
this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z' : null;
};
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function (key) {
return this.valueOf();
};
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent,
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
rep;
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c :
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' : '"' + string + '"';
}
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON method, call it to obtain a replacement value.
if (value && typeof value === 'object' &&
typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.
if (typeof rep === 'function') {
value = rep.call(holder, key, value);
}
// What happens next depends on the value's type.
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
// JSON numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.
return String(value);
// If the type is 'object', we might be dealing with an object or an array or
// null.
case 'object':
// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.
if (!value) {
return 'null';
}
// Make an array to hold the partial results of stringifying this object value.
gap += indent;
partial = [];
// Is the value an array?
if (Object.prototype.toString.apply(value) === '[object Array]') {
// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
// Join all of the elements together, separated with commas, and wrap them in
// brackets.
v = partial.length === 0 ? '[]' : gap ?
'[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
// If the replacer is an array, use it to select the members to be stringified.
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
if (typeof rep[i] === 'string') {
k = rep[i];
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
} else {
// Otherwise, iterate through all of the keys in the object.
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
// Join all of the member texts together, separated with commas,
// and wrap them in braces.
v = partial.length === 0 ? '{}' : gap ?
'{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
'{' + partial.join(',') + '}';
gap = mind;
return v;
}
}
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
JSON.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.
var i;
gap = '';
indent = '';
// If the space parameter is a number, make an indent string containing that
// many spaces.
if (typeof space === 'number') {
for (i = 0; i < space; i += 1) {
indent += ' ';
}
// If the space parameter is a string, it will be used as the indent string.
} else if (typeof space === 'string') {
indent = space;
}
// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.
rep = replacer;
if (replacer && typeof replacer !== 'function' &&
(typeof replacer !== 'object' ||
typeof replacer.length !== 'number')) {
throw new Error('JSON.stringify');
}
// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.
return str('', {'': value});
};
}
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.
var j;
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.
// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
j = eval('(' + text + ')');
// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.
return typeof reviver === 'function' ?
walk({'': j}, '') : j;
}
// If the text is not JSON parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON.parse');
};
}
}());
| Humsen/web/web-mobile/WebContent/plugins/json/js/json2.js/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/json/js/json2.js",
"repo_id": "Humsen",
"token_count": 8028
} | 51 |
(function($) {
/**
* Bulgarian language package
* Translated by @mraiur
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Моля, въведете валиден base 64 кодиран'
},
between: {
'default': 'Моля, въведете стойност между %s и %s',
notInclusive: 'Моля, въведете стойност точно между %s и %s'
},
callback: {
'default': 'Моля, въведете валидна стойност'
},
choice: {
'default': 'Моля, въведете валидна стойност',
less: 'Моля изберете минимална стойност %s',
more: 'Моля изберете максимална стойност %s',
between: 'Моля изберете от %s до %s стойност'
},
color: {
'default': 'Моля, въведете валиден цвят'
},
creditCard: {
'default': 'Моля, въведете валиден номер на кредитна карта'
},
cusip: {
'default': 'Моля, въведете валиден CUSIP номер'
},
cvv: {
'default': 'Моля, въведете валиден CVV номер'
},
date: {
'default': 'Моля, въведете валидна дата',
min: 'Моля въведете дата след %s',
max: 'Моля въведете дата преди %s',
range: 'Моля въведете дата между %s и %s'
},
different: {
'default': 'Моля, въведете различна стойност'
},
digits: {
'default': 'Моля, въведете само цифри'
},
ean: {
'default': 'Моля, въведете валиден EAN номер'
},
emailAddress: {
'default': 'Моля, въведете валиден имейл адрес'
},
file: {
'default': 'Моля, изберете валиден файл'
},
greaterThan: {
'default': 'Моля, въведете стойност по-голяма от или равна на %s',
notInclusive: 'Моля, въведете стойност по-голяма от %s'
},
grid: {
'default': 'Моля, изберете валиден GRId номер'
},
hex: {
'default': 'Моля, въведете валиден шестнадесетичен номер'
},
hexColor: {
'default': 'Моля, въведете валиден шестнадесетичен цвят'
},
iban: {
'default': 'Моля, въведете валиден IBAN номер',
countryNotSupported: 'Държавата %s не се поддържа',
country: 'Моля, въведете валиден номер на IBAN в %s',
countries: {
АD: 'Андора',
AE: 'Обединени арабски емирства',
AL: 'Албания',
AO: 'Ангола',
AT: 'Австрия',
AZ: 'Азербайджан',
BA: 'Босна и Херцеговина',
BE: 'Белгия',
BF: 'Буркина Фасо',
BG: 'България',
BH: 'Бахрейн',
BI: 'Бурунди',
BJ: 'Бенин',
BR: 'Бразилия',
CH: 'Швейцария',
CI: 'Ivory Coast',
CM: 'Камерун',
CR: 'Коста Рика',
CV: 'Cape Verde',
CY: 'Кипър',
CZ: 'Чешката република',
DE: 'Германия',
DK: 'Дания',
DO: 'Доминиканска република',
DZ: 'Алжир',
EE: 'Естония',
ES: 'Испания',
FI: 'Финландия',
FO: 'Фарьорските острови',
FR: 'Франция',
GB: 'Обединеното кралство',
GE: 'Грузия',
GI: 'Гибралтар',
GL: 'Гренландия',
GR: 'Гърция',
GT: 'Гватемала',
HR: 'Хърватия',
HU: 'Унгария',
IE: 'Ирландия',
IL: 'Израел',
IR: 'Иран',
IS: 'Исландия',
IT: 'Италия',
JO: 'Йордания',
KW: 'Кувейт',
KZ: 'Казахстан',
LB: 'Ливан',
LI: 'Лихтенщайн',
LT: 'Литва',
LU: 'Люксембург',
LV: 'Латвия',
MC: 'Монако',
MD: 'Молдова',
ME: 'Черна гора',
MG: 'Мадагаскар',
MK: 'Македония',
ML: 'Мали',
MR: 'Мавритания',
MT: 'Малта',
MU: 'Мавриций',
MZ: 'Мозамбик',
NL: 'Нидерландия',
NO: 'Норвегия',
PK: 'Пакистан',
PL: 'Полша',
PS: 'палестинска',
PT: 'Португалия',
QA: 'Катар',
RO: 'Румъния',
RS: 'Сърбия',
SA: 'Саудитска Арабия',
SE: 'Швеция',
SI: 'Словения',
SK: 'Словакия',
SM: 'San Marino',
SN: 'Сенегал',
TN: 'Тунис',
TR: 'Турция',
VG: 'Британски Вирджински острови'
}
},
id: {
'default': 'Моля, въведете валиден идентификационен номер',
countryNotSupported: 'Кода на държавата %s не се поддържа',
country: 'Моля, въведете валиден идентификационен номер в %s',
countries: {
BA: 'Босна и Херцеговина',
BG: 'България',
BR: 'Бразилия',
СН: 'Швейцария',
CL: 'Чили',
CN: 'Китай',
CZ: 'Чешката република',
DK: 'Дания',
EE: 'Естония',
ES: 'Испания',
FI: 'Финландия',
HR: 'Хърватия',
IE: 'Ирландия',
IS: 'Исландия',
LT: 'Литва',
LV: 'Латвия',
ME: 'Черна гора',
MK: 'Македония',
NL: 'Холандия',
RO: 'Румъния',
RS: 'Сърбия',
SE: 'Швеция',
SI: 'Словения',
SK: 'Словакия',
SM: 'San Marino',
TH: 'Тайланд',
ZA: 'Южна Африка'
}
},
identical: {
'default': 'Моля, въведете една и съща стойност'
},
imei: {
'default': 'Моля, въведете валиден IMEI номер'
},
imo: {
'default': 'Моля, въведете валиден IMO номер'
},
integer: {
'default': 'Моля, въведете валиден номер'
},
ip: {
'default': 'Моля, въведете валиден IP адрес',
ipv4: 'Моля, въведете валиден IPv4 адрес',
ipv6: 'Моля, въведете валиден IPv6 адрес'
},
isbn: {
'default': 'Моля, въведете валиден ISBN номер'
},
isin: {
'default': 'Моля, въведете валиден ISIN номер'
},
ismn: {
'default': 'Моля, въведете валиден ISMN номер'
},
issn: {
'default': 'Моля, въведете валиден ISSN номер'
},
lessThan: {
'default': 'Моля, въведете стойност по-малка или равна на %s',
notInclusive: 'Моля, въведете стойност по-малко от %s'
},
mac: {
'default': 'Моля, въведете валиден MAC адрес'
},
meid: {
'default': 'Моля, въведете валиден MEID номер'
},
notEmpty: {
'default': 'Моля, въведете стойност'
},
numeric: {
'default': 'Моля, въведете валидно число с плаваща запетая'
},
phone: {
'default': 'Моля, въведете валиден телефонен номер',
countryNotSupported: 'Държавата %s не се поддържа',
country: 'Моля, въведете валиден телефонен номер в %s',
countries: {
BR: 'Бразилия',
CN: 'Китай',
CZ: 'Чешката република',
DE: 'Германия',
DK: 'Дания',
ES: 'Испания',
FR: 'Франция',
GB: 'Обединеното кралство',
MA: 'Мароко',
PK: 'Пакистан',
RO: 'Румъния',
RU: 'Русия',
SK: 'Словакия',
TH: 'Тайланд',
US: 'САЩ',
VE: 'Венецуела'
}
},
regexp: {
'default': 'Моля, въведете стойност, отговаряща на модела'
},
remote: {
'default': 'Моля, въведете валидна стойност'
},
rtn: {
'default': 'Моля, въведете валиде RTN номер'
},
sedol: {
'default': 'Моля, въведете валиден SEDOL номер'
},
siren: {
'default': 'Моля, въведете валиден SIREN номер'
},
siret: {
'default': 'Моля, въведете валиден SIRET номер'
},
step: {
'default': 'Моля, въведете валиденa стъпка от %s'
},
stringCase: {
'default': 'Моля, въведете само с малки букви',
upper: 'Моля въведете само главни букви'
},
stringLength: {
'default': 'Моля, въведете стойност с валидни дължина',
less: 'Моля, въведете по-малко от %s знака',
more: 'Моля въведете повече от %s знака',
between: 'Моля, въведете стойност между %s и %s знака'
},
uri: {
'default': 'Моля, въведете валиден URI'
},
uuid: {
'default': 'Моля, въведете валиден UUID номер',
version: 'Моля, въведете валиден UUID номер с версия %s'
},
vat: {
'default': 'Моля, въведете валиден ДДС',
countryNotSupported: 'Държавата %s не се поддържа',
country: 'Моля, въведете валиден ДДС в %s',
countries: {
AT: 'Австрия',
BE: 'Белгия',
BG: 'България',
BR: 'Бразилия',
СН: 'Швейцария',
CY: 'Кипър',
CZ: 'Чешката република',
DE: 'Германия',
DK: 'Дания',
EE: 'Естония',
ES: 'Испания',
FI: 'Финландия',
FR: 'Франция',
GB: 'Обединеното кралство',
GR: 'Гърция',
EL: 'Гърция',
HU: 'Унгария',
HR: 'Ирландия',
IE: 'Ирландски',
IS: 'Исландия',
IT: 'Италия',
LT: 'Литва',
LU: 'Люксембург',
LV: 'Латвия',
MT: 'Малта',
NL: 'Холандия',
NO: 'Норвегия',
PL: 'Полша',
PT: 'Португалия',
RO: 'Румъния',
RU: 'Русия',
RS: 'Сърбия',
SE: 'Швеция',
SI: 'Словения',
SK: 'Словакия',
VE: 'Венецуела',
ZA: 'Южна Африка'
}
},
vin: {
'default': 'Моля, въведете валиден номер VIN'
},
zipCode: {
'default': 'Моля, въведете валиден пощенски код',
countryNotSupported: 'Кода на държавата %s не се поддържа',
country: 'Моля, въведете валиден пощенски код в %s',
countries: {
AT: 'Австрия',
BR: 'Бразилия',
CA: 'Канада',
СН: 'Швейцария',
CZ: 'Чешката република',
DE: 'Германия',
DK: 'Дания',
FR: 'Франция',
GB: 'Обединеното кралство',
IE: 'Ирландски',
IT: 'Италия',
MA: 'Мароко',
NL: 'Холандия',
PT: 'Португалия',
RO: 'Румъния',
RU: 'Русия',
SE: 'Швеция',
SG: 'Сингапур',
SK: 'Словакия',
US: 'САЩ'
}
}
});
}(window.jQuery));
| Humsen/web/web-mobile/WebContent/plugins/validator/js/language/bg_BG.js/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/validator/js/language/bg_BG.js",
"repo_id": "Humsen",
"token_count": 10627
} | 52 |
(function($) {
/**
* Norwegian language package
* Translated by @trondulseth
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Vennligst fyll ut dette feltet med en gyldig base64-kodet verdi'
},
between: {
'default': 'Vennligst fyll ut dette feltet med en verdi mellom %s og %s',
notInclusive: 'Vennligst tast inn kun en verdi mellom %s og %s'
},
callback: {
'default': 'Vennligst fyll ut dette feltet med en gyldig verdi'
},
choice: {
'default': 'Vennligst fyll ut dette feltet med en gyldig verdi',
less: 'Vennligst velg minst %s valgmuligheter',
more: 'Vennligst velg maks %s valgmuligheter',
between: 'Vennligst velg %s - %s valgmuligheter'
},
color: {
'default': 'Vennligst fyll ut dette feltet med en gyldig'
},
creditCard: {
'default': 'Vennligst fyll ut dette feltet med et gyldig kreditkortnummer'
},
cusip: {
'default': 'Vennligst fyll ut dette feltet med et gyldig CUSIP-nummer'
},
cvv: {
'default': 'Vennligst fyll ut dette feltet med et gyldig CVV-nummer'
},
date: {
'default': 'Vennligst fyll ut dette feltet med en gyldig dato',
min: 'Vennligst fyll ut dette feltet med en gyldig dato etter %s',
max: 'Vennligst fyll ut dette feltet med en gyldig dato før %s',
range: 'Vennligst fyll ut dette feltet med en gyldig dato mellom %s - %s'
},
different: {
'default': 'Vennligst fyll ut dette feltet med en annen verdi'
},
digits: {
'default': 'Vennligst tast inn kun sifre'
},
ean: {
'default': 'Vennligst fyll ut dette feltet med et gyldig EAN-nummer'
},
emailAddress: {
'default': 'Vennligst fyll ut dette feltet med en gyldig epostadresse'
},
file: {
'default': 'Velg vennligst en gyldig fil'
},
greaterThan: {
'default': 'Vennligst fyll ut dette feltet med en verdi større eller lik %s',
notInclusive: 'Vennligst fyll ut dette feltet med en verdi større enn %s'
},
grid: {
'default': 'Vennligst fyll ut dette feltet med et gyldig GRIDnummer'
},
hex: {
'default': 'Vennligst fyll ut dette feltet med et gyldig hexadecimalt nummer'
},
hexColor: {
'default': 'Vennligst fyll ut dette feltet med en gyldig hexfarge'
},
iban: {
'default': 'Vennligst fyll ut dette feltet med et gyldig IBAN-nummer',
countryNotSupported: 'Landskoden %s støttes desverre ikke',
country: 'Vennligst fyll ut dette feltet med et gyldig IBAN-nummer i %s',
countries: {
AD: 'Andorra',
AE: 'De Forente Arabiske Emirater',
AL: 'Albania',
AO: 'Angola',
AT: 'Østerrike',
AZ: 'Aserbajdsjan',
BA: 'Bosnia-Hercegovina',
BE: 'Belgia',
BF: 'Burkina Faso',
BG: 'Bulgaria',
BH: 'Bahrain',
BI: 'Burundi',
BJ: 'Benin',
BR: 'Brasil',
CH: 'Sveits',
CI: 'Elfenbenskysten',
CM: 'Kamerun',
CR: 'Costa Rica',
CV: 'Kapp Verde',
CY: 'Kypros',
CZ: 'Tsjekkia',
DE: 'Tyskland',
DK: 'Danmark',
DO: 'Den dominikanske republikk',
DZ: 'Algerie',
EE: 'Estland',
ES: 'Spania',
FI: 'Finland',
FO: 'Færøyene',
FR: 'Frankrike',
GB: 'Storbritannia',
GE: 'Georgia',
GI: 'Gibraltar',
GL: 'Grønland',
GR: 'Hellas',
GT: 'Guatemala',
HR: 'Kroatia',
HU: 'Ungarn',
IE: 'Irland',
IL: 'Israel',
IR: 'Iran',
IS: 'Island',
IT: 'Italia',
JO: 'Jordan',
KW: 'Kuwait',
KZ: 'Kasakhstan',
LB: 'Libanon',
LI: 'Liechtenstein',
LT: 'Litauen',
LU: 'Luxembourg',
LV: 'Latvia',
MC: 'Monaco',
MD: 'Moldova',
ME: 'Montenegro',
MG: 'Madagaskar',
MK: 'Makedonia',
ML: 'Mali',
MR: 'Mauritania',
MT: 'Malta',
MU: 'Mauritius',
MZ: 'Mosambik',
NL: 'Nederland',
NO: 'Norge',
PK: 'Pakistan',
PL: 'Polen',
PS: 'Palestina',
PT: 'Portugal',
QA: 'Qatar',
RO: 'Romania',
RS: 'Serbia',
SA: 'Saudi-Arabia',
SE: 'Sverige',
SI: 'Slovenia',
SK: 'Slovakia',
SM: 'San Marino',
SN: 'Senegal',
TN: 'Tunisia',
TR: 'Tyrkia',
VG: 'De Britiske Jomfruøyene'
}
},
id: {
'default': 'Vennligst fyll ut dette feltet med et gyldig identifikasjons-nummer',
countryNotSupported: 'Landskoden %s støttes desverre ikke',
country: 'Vennligst fyll ut dette feltet med et gyldig identifikasjons-nummer i %s',
countries: {
BA: 'Bosnien-Hercegovina',
BG: 'Bulgaria',
BR: 'Brasil',
CH: 'Sveits',
CL: 'Chile',
CN: 'Kina',
CZ: 'Tsjekkia',
DK: 'Danmark',
EE: 'Estland',
ES: 'Spania',
FI: 'Finland',
HR: 'Kroatia',
IE: 'Irland',
IS: 'Island',
LT: 'Litauen',
LV: 'Latvia',
ME: 'Montenegro',
MK: 'Makedonia',
NL: 'Nederland',
RO: 'Romania',
RS: 'Serbia',
SE: 'Sverige',
SI: 'Slovenia',
SK: 'Slovakia',
SM: 'San Marino',
TH: 'Thailand',
ZA: 'Sør-Afrika'
}
},
identical: {
'default': 'Vennligst fyll ut dette feltet med den samme verdi'
},
imei: {
'default': 'Vennligst fyll ut dette feltet med et gyldig IMEI-nummer'
},
imo: {
'default': 'Vennligst fyll ut dette feltet med et gyldig IMO-nummer'
},
integer: {
'default': 'Vennligst fyll ut dette feltet med et gyldig tall'
},
ip: {
'default': 'Vennligst fyll ut dette feltet med en gyldig IP adresse',
ipv4: 'Vennligst fyll ut dette feltet med en gyldig IPv4 adresse',
ipv6: 'Vennligst fyll ut dette feltet med en gyldig IPv6 adresse'
},
isbn: {
'default': 'Vennligst fyll ut dette feltet med ett gyldig ISBN-nummer'
},
isin: {
'default': 'Vennligst fyll ut dette feltet med ett gyldig ISIN-nummer'
},
ismn: {
'default': 'Vennligst fyll ut dette feltet med ett gyldig ISMN-nummer'
},
issn: {
'default': 'Vennligst fyll ut dette feltet med ett gyldig ISSN-nummer'
},
lessThan: {
'default': 'Vennligst fyll ut dette feltet med en verdi mindre eller lik %s',
notInclusive: 'Vennligst fyll ut dette feltet med en verdi mindre enn %s'
},
mac: {
'default': 'Vennligst fyll ut dette feltet med en gyldig MAC adresse'
},
meid: {
'default': 'Vennligst fyll ut dette feltet med et gyldig MEID-nummer'
},
notEmpty: {
'default': 'Vennligst fyll ut dette feltet'
},
numeric: {
'default': 'Vennligst fyll ut dette feltet med et gyldig flydende desimaltal'
},
phone: {
'default': 'Vennligst fyll ut dette feltet med et gyldig telefonnummer',
countryNotSupported: 'Landskoden %s støttes desverre ikke',
country: 'Vennligst fyll ut dette feltet med et gyldig telefonnummer i %s',
countries: {
BR: 'Brasil',
CN: 'Kina',
CZ: 'Tsjekkia',
DE: 'Tyskland',
DK: 'Danmark',
ES: 'Spania',
FR: 'Frankrike',
GB: 'Storbritannia',
MA: 'Marokko',
PK: 'Pakistan',
RO: 'Rumenia',
RU: 'Russland',
SK: 'Slovakia',
TH: 'Thailand',
US: 'USA',
VE: 'Venezuela'
}
},
regexp: {
'default': 'Vennligst fyll ut dette feltet med en verdi som matcher mønsteret'
},
remote: {
'default': 'Vennligst fyll ut dette feltet med en gyldig verdi'
},
rtn: {
'default': 'Vennligst fyll ut dette feltet med et gyldig RTN-nummer'
},
sedol: {
'default': 'Vennligst fyll ut dette feltet med et gyldig SEDOL-nummer'
},
siren: {
'default': 'Vennligst fyll ut dette feltet med et gyldig SIREN-nummer'
},
siret: {
'default': 'Vennligst fyll ut dette feltet med et gyldig SIRET-nummer'
},
step: {
'default': 'Vennligst fyll ut dette feltet med et gyldig trin af %s'
},
stringCase: {
'default': 'Venligst fyll inn dette feltet kun med små bokstaver',
upper: 'Venligst fyll inn dette feltet kun med store bokstaver'
},
stringLength: {
'default': 'Vennligst fyll ut dette feltet med en verdi af gyldig længde',
less: 'Vennligst fyll ut dette feltet med mindre enn %s tegn',
more: 'Vennligst fyll ut dette feltet med mer enn %s tegn',
between: 'Vennligst fyll ut dette feltet med en verdi mellom %s og %s tegn'
},
uri: {
'default': 'Vennligst fyll ut dette feltet med en gyldig URI'
},
uuid: {
'default': 'Vennligst fyll ut dette feltet med et gyldig UUID-nummer',
version: 'Vennligst fyll ut dette feltet med en gyldig UUID version %s-nummer'
},
vat: {
'default': 'Vennligst fyll ut dette feltet med et gyldig MVA nummer',
countryNotSupported: 'Landskoden %s støttes desverre ikke',
country: 'Vennligst fyll ut dette feltet med et gyldig MVA nummer i %s',
countries: {
AT: 'Østerrike',
BE: 'Belgia',
BG: 'Bulgaria',
BR: 'Brasil',
CH: 'Schweiz',
CY: 'Cypern',
CZ: 'Tsjekkia',
DE: 'Tyskland',
DK: 'Danmark',
EE: 'Estland',
ES: 'Spania',
FI: 'Finland',
FR: 'Frankrike',
GB: 'Storbritania',
GR: 'Hellas',
EL: 'Hellas',
HU: 'Ungarn',
HR: 'Kroatia',
IE: 'Irland',
IS: 'Island',
IT: 'Italia',
LT: 'Litauen',
LU: 'Luxembourg',
LV: 'Latvia',
MT: 'Malta',
NL: 'Nederland',
NO: 'Norge',
PL: 'Polen',
PT: 'Portugal',
RO: 'Romania',
RU: 'Russland',
RS: 'Serbia',
SE: 'Sverige',
SI: 'Slovenia',
SK: 'Slovakia',
VE: 'Venezuela',
ZA: 'Sør-Afrika'
}
},
vin: {
'default': 'Vennligst fyll ut dette feltet med et gyldig VIN-nummer'
},
zipCode: {
'default': 'Vennligst fyll ut dette feltet med et gyldig postnummer',
countryNotSupported: 'Landskoden %s støttes desverre ikke',
country: 'Vennligst fyll ut dette feltet med et gyldig postnummer i %s',
countries: {
AT: 'Østerrike',
BR: 'Brasil',
CA: 'Canada',
CH: 'Schweiz',
CZ: 'Tsjekkia',
DE: 'Tyskland',
DK: 'Danmark',
FR: 'Frankrike',
GB: 'Storbritannia',
IE: 'Irland',
IT: 'Italia',
MA: 'Marokko',
NL: 'Nederland',
PT: 'Portugal',
RO: 'Romania',
RU: 'Russland',
SE: 'Sverige',
SG: 'Singapore',
SK: 'Slovakia',
US: 'USA'
}
}
});
}(window.jQuery));
| Humsen/web/web-mobile/WebContent/plugins/validator/js/language/no_NO.js/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/validator/js/language/no_NO.js",
"repo_id": "Humsen",
"token_count": 8169
} | 53 |
.webuploader-container {
position: relative;
}
.webuploader-element-invisible {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px,1px,1px,1px);
}
.webuploader-pick {
position: relative;
display: inline-block;
cursor: pointer;
background: #00b7ee;
padding: 10px 15px;
color: #fff;
text-align: center;
border-radius: 3px;
overflow: hidden;
}
.webuploader-pick-hover {
background: #00a2d4;
}
.webuploader-pick-disable {
opacity: 0.6;
pointer-events:none;
}
| Humsen/web/web-mobile/WebContent/plugins/webuploader/webuploader.css/0 | {
"file_path": "Humsen/web/web-mobile/WebContent/plugins/webuploader/webuploader.css",
"repo_id": "Humsen",
"token_count": 218
} | 54 |
/**
* 加载博客目录
*
* @author 何明胜
*
* 2017年9月18日
*/
/** 加载插件 * */
$.ajax({
url : '/plugins/plugins.html', // 这里是静态页的地址
async : false,
type : 'GET', // 静态页用get方法,否则服务器会抛出405错误
success : function(data) {
$($('head')[0]).find('script:first').after(data);
}
});
$(function() {
/** 顶部导航栏 **/
$.ajax({
url : '/module/navigation/topbar.html', // 这里是静态页的地址
async : false,
type : 'GET', // 静态页用get方法,否则服务器会抛出405错误
success : function(data) {
$('#menuBarNo').before(data);
}
});
/** 登录控制 **/
$.ajax({
url : '/module/login/login.html', // 这里是静态页的地址
async : false,
type : 'GET', // 静态页用get方法,否则服务器会抛出405错误
success : function(data) {
$('#menuBarNo').before(data);
}
});
/** 左侧导航栏 **/
$.ajax({
url : '/module/navigation/leftbar.html', // 这里是静态页的地址
async : false,
type : 'GET', // 静态页用get方法,否则服务器会抛出405错误
success : function(data) {
$('#fh5co-main').before(data);
}
});
/** 右侧导航栏 **/
$.ajax({
url : '/module/navigation/rightbar.html', // 这里是静态页的地址
async : false,
type : 'GET', // 静态页用get方法,否则服务器会抛出405错误
success : function(data) {
$('#fh5co-main').after(data);
}
});
});
//博客总数
var blog_total_num = 0;
var blog_page_size = 5;//默认每页显示5条
$(function(){
queryBlogNum();
queryBlogCatalog(1);
//页面选择
choosePageSize();
});
/**
* 查询博客数量
* @returns
*/
function queryBlogNum(){
$.ajax({
type : 'POST',
async: false,
url : '/blog/query.hms',
data : {
type : 'query_total_num',
keywords : $.getUrlParam('keywords') ? $.getUrlParam('keywords') : '',
category : $.getUrlParam('category') ? $.getUrlParam('category') : '',
},
success : function(response){
blog_total_num = response;
},
error : function(XMLHttpRequest, textStatus){
$.confirm({
title: '博客加载出错',
content: textStatus + ' : ' + XMLHttpRequest.status,
autoClose: 'ok|1000',
type: 'green',
buttons: {
ok: {
text: '确认',
btnClass: 'btn-primary',
},
}
});
}
});
}
/**
* 查询博客目录
*
* @param pageSize
* @param pageNo
* @returns
*/
function queryBlogCatalog(pageNo){
$.ajax({
type : 'POST',
async: false,
url : '/blog/query.hms',
dataType : 'json',
data : {
type : 'query_one_page',
keywords : $.getUrlParam('keywords') ? $.getUrlParam('keywords') : '',
category : $.getUrlParam('category') ? $.getUrlParam('category') : '',
pageSize : blog_page_size,
pageNo : pageNo,
},
success : function(response){
for(x in response){
loadSimpleBlog(response[x]);
}
showPagination(pageNo, 6);//显示分页,6为最大显示6条分页页码
},
error : function(XMLHttpRequest, textStatus){
$.confirm({
title: '博客目录加载出错',
content: textStatus + ' : ' + XMLHttpRequest.status,
autoClose: 'ok|1000',
type: 'red',
buttons: {
ok: {
text: '确认',
btnClass: 'btn-primary',
},
}
});
}
});
}
/**
* 加载目录形式的博客
*
* @param blog_data
* @returns
*/
function loadSimpleBlog(blog_data){
$('#list_blog').append('<div class="fh5co-entry padding">'
+ '<span class="fh5co-post-date">' + new Date(blog_data.blogDate.time).format('yyyy-MM-dd hh:mm:ss') + '</span>'
+ '<span class="fh5co-post-date">作者:' + blog_data.userNickName + '</span>'
+ '<span class="fh5co-post-date">浏览' + blog_data.blogRead + '次</span>'
+ '<h2 class="article-title"><input type="hidden" value=' + blog_data.blogId + ' />'
+ '<a href=/blog.hms?blogId=' + blog_data.blogId + '>' + blog_data.blogTitle + '</a></h2>'
+ '<p><b>摘要:</b>' + blog_data.blogSummary + '</p>'
+ '</div>'
+ '</div><hr>');
}
/**
* 显示底部分页
*
* @returns void
*/
function showPagination(currPageNum, paginationMaxLength){
$('#list_blog').append('<hr />'
+ '<div id="pagination" class="text-align-center" pagination="pagination_new" '
+ ' currpagenum=' + currPageNum + ' paginationmaxlength=' + paginationMaxLength + ' totalpages=' + Math.ceil(blog_total_num/blog_page_size)
+ ' onlyonepageshow="true"> '
+ '</div>'
+ '<hr />');
//显示分页, 调用pagination.js
PaginationHelper($('#pagination'), blog_page_size);
}
/**
* 选择每页显示博客数量
*
* @returns
*/
function choosePageSize(){
$('#choose_page_size').find('.dropdown-menu').children('li').click(function() {
blog_page_size = $(this).attr('value');
$('#list_blog').html('');
queryBlogNum();
queryBlogCatalog(currentPageNum);
choosePageSize();
});
}
/**
* 实现的点击事件,参数为分页容器的id
* pagination.js调用这里
*
* @param currentPageNum
* @returns
*/
function paginationClick(currentPageNum) {
$('#list_blog').html('');
queryBlogNum();
queryBlogCatalog(currentPageNum);
} | Humsen/web/web-pc/WebContent/js/article/blog.js/0 | {
"file_path": "Humsen/web/web-pc/WebContent/js/article/blog.js",
"repo_id": "Humsen",
"token_count": 2583
} | 55 |
/**
* 网站顶部导航栏
*
* @author 何明胜
*
* 2017年10月18日
*/
$(document).ready(
function() {
// 选择的栏目增加active
var menuBarNo = Number($('#menuBarNo').val());
$('.nav.nav-pills.topbar-nav').children().removeClass('active').eq(
menuBarNo).addClass('active');
// 加载当前网站访问统计
loadAccessStatistics();
// 搜索类型选择事件注册
chooseSearchType();
//绑定回车键
searchKeyEvent();
});
/**
* 加载当前网站访问统计
*
* @returns
*/
function loadAccessStatistics() {
$.ajax({
type : 'POST',
url : '/accessAtatistics.hms',
dataType : 'json',
success : function(response, ststus) {
$('#txt_accessToday').html('今日访问量:' + response.accessToday + ',');
$('#txt_accessTotal').html('总访问量:' + response.accessTotal + ',');
$('#txt_onlineCurrent').html('当前在线人数:' + response.onlineCurrent);
},
error : function(XMLHttpRequest, textStatus) {
$.confirm({
title : '网站访问统计加载出错',
content : textStatus + ' : ' + XMLHttpRequest.status,
autoClose : 'ok|2000',
type : 'red',
buttons : {
ok : {
text : '确认',
btnClass : 'btn-primary',
},
}
});
}
});
}
/**
* 点击加载下一个主题
*
* @returns
*/
function nextThemeClick() {
var curr_theme_no = 0;
if (typeof $.cookie('theme_no') == 'undefined') {
$.cookie('theme_no', 0);
} else {
curr_theme_no = Number($.cookie('theme_no'));
$.cookie('theme_no', curr_theme_no + 1);
}
curr_theme_no = (curr_theme_no + 1) % 5;
var img = '/images/background/bg-' + curr_theme_no + '.jpg';
$('body').css('background-image', 'url(' + img + ')');
}
/**
* 选择搜索类型
*
* @returns
*/
function chooseSearchType() {
$('#choose_search_type').find('.dropdown-menu').children('li').click(
function() {
searchByKeyWords($(this).attr('value'));
});
$('#search_blog').click(function() {
searchByKeyWords('blog');
})
}
/**
* 跳转到相应页面,并附带搜索参数
*
* @param searchType
* @returns
*/
function searchByKeyWords(searchType) {
if (searchType == 'blog') {
$(window).attr('location',
'/module/blog.hms?keywords=' + $('#search_keyWords').val());
}
if (searchType == 'code') {
$(window).attr('location',
'/module/code.hms?keywords=' + $('#search_keyWords').val());
}
}
/**
* 搜索输入框绑定回车键
*
* @returns
*/
function searchKeyEvent() {
$('#search_keyWords').keypress(function(event) {
if (event.keyCode == 13) {
searchByKeyWords('blog');
}
});
} | Humsen/web/web-pc/WebContent/js/navigation/topbar.js/0 | {
"file_path": "Humsen/web/web-pc/WebContent/js/navigation/topbar.js",
"repo_id": "Humsen",
"token_count": 1240
} | 56 |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>写新文章</title>
</head>
<!-- 网站图标 -->
<link rel="shortcut icon" href="/images/favicon.ico">
<!-- jQuery -->
<script src="/plugins/jquery/js/jquery-3.2.1.min.js"></script>
<!-- editormd start -->
<link rel="stylesheet" href="/plugins/editormd/css/editormd.min.css" />
<!-- 自定义css -->
<link rel="stylesheet" href="/css/upload/editor-article.css">
<!-- editormd -->
<script src="/plugins/editormd/js/editormd.min.js"></script>
<script src="/js/editor/editor.js"></script>
<body>
<div id="form_editorArticle" class="form-horizontal editor-form-div ">
<!-- 标题 -->
<div class="form-group">
<label for="txt_title" class="col-sm-1 control-label">标题</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="txt_title"
placeholder="标题">
</div>
</div>
<div class="form-group">
<!-- 作者 -->
<label for="txt_author" class="col-sm-1 control-label">作者</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="txt_author" disabled>
</div>
<!-- 文章类型 -->
<div class="col-sm-2 article-type">
<label class="radio-inline"> <input type="radio"
name="article" value="blog" checked="checked" /> 博客
</label> <label class="radio-inline"> <input type="radio"
name="article" value="code" /> 代码
</label>
</div>
<!-- 文章标签 -->
<label for="txt_articleLabel" class="col-sm-1 control-label">标签</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="txt_articleLabel"
placeholder="标签,用空格分隔,含空格词组的用逗号分隔">
</div>
<!-- 文章类别 -->
<div class="col-sm-2">
<button type="button" class="btn btn-default dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span id="txt_curCategory">所有文章 </span> <span class="caret"></span>
</button>
<input id="txt_curCtegy" type="hidden" value="">
<ul class="dropdown-menu category-width">
<!-- <li value="0"><a href="#">所有文章</a></li> -->
<li role="separator" class="divider"></li>
<li id="tbl_addCategory">
<div class="row">
<div class="col-sm-7 category-input">
<input type="text" class="form-control ">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-default">添加</button>
</div>
</div>
</li>
</ul>
</div>
<!-- 发布按钮 -->
<div class="col-sm-1">
<button id="btn_publish" type="button"
class="btn btn-success btn-lg">发布</button>
</div>
<!-- 清空按钮 -->
<div class="col-sm-1">
<button id="btn_clearEditor" type="button" class="btn btn-danger">清空</button>
</div>
</div>
<!-- 摘要 -->
<div class="form-group">
<label for="txt_summary" class="col-sm-1 control-label">摘要</label>
<div class="col-sm-10">
<textarea id="txt_summary" class="form-control" rows="3"
placeholder="摘要"></textarea>
</div>
</div>
<hr class="dotted-line" />
<!-- 正文 -->
<!-- editormd start -->
<div class="editormd" id="div_editorMd">
<textarea class="editormd-markdown-textarea" name="editorMd"
id="txt_editorMdContent"></textarea>
<!-- 第二个隐藏文本域,用来构造生成的HTML代码,方便表单POST提交,这里的name可以任意取,后台接受时以这个name键为准 -->
<!-- html textarea 需要开启配置项 saveHTMLToTextarea == true -->
<textarea class="editormd-html-textarea" name="editorHtml"
id="txt_editorHtml"></textarea>
</div>
<!-- editormd end -->
</div>
</body>
</html> | Humsen/web/web-pc/WebContent/module/upload/editor.html/0 | {
"file_path": "Humsen/web/web-pc/WebContent/module/upload/editor.html",
"repo_id": "Humsen",
"token_count": 1753
} | 57 |
(function($) {
/**
* Spanish language package
* Translated by @vadail
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Por favor introduce un valor válido en base 64'
},
between: {
'default': 'Por favor introduce un valor entre %s y %s',
notInclusive: 'Por favor introduce un valor sólo entre %s and %s'
},
callback: {
'default': 'Por favor introduce un valor válido'
},
choice: {
'default': 'Por favor introduce un valor válido',
less: 'Por favor elija %s opciones como mínimo',
more: 'Por favor elija %s optiones como máximo',
between: 'Por favor elija de %s a %s opciones'
},
color: {
'default': 'Por favor introduce un color válido'
},
creditCard: {
'default': 'Por favor introduce un número válido de tarjeta de crédito'
},
cusip: {
'default': 'Por favor introduce un número CUSIP válido'
},
cvv: {
'default': 'Por favor introduce un número CVV válido'
},
date: {
'default': 'Por favor introduce una fecha válida',
min: 'Por favor introduce una fecha posterior al %s',
max: 'Por favor introduce una fecha previa al %s',
range: 'Por favor introduce una fecha entre el %s y el %s'
},
different: {
'default': 'Por favor introduce un valor distinto'
},
digits: {
'default': 'Por favor introduce sólo dígitos'
},
ean: {
'default': 'Por favor introduce un número EAN válido'
},
emailAddress: {
'default': 'Por favor introduce un email válido'
},
file: {
'default': 'Por favor elija un archivo válido'
},
greaterThan: {
'default': 'Por favor introduce un valor mayor o igual a %s',
notInclusive: 'Por favor introduce un valor mayor que %s'
},
grid: {
'default': 'Por favor introduce un número GRId válido'
},
hex: {
'default': 'Por favor introduce un valor hexadecimal válido'
},
hexColor: {
'default': 'Por favor introduce un color hexadecimal válido'
},
iban: {
'default': 'Por favor introduce un número IBAN válido',
countryNotSupported: 'El código del país %s no está soportado',
country: 'Por favor introduce un número IBAN válido en %s',
countries: {
AD: 'Andorra',
AE: 'Emiratos Árabes Unidos',
AL: 'Albania',
AO: 'Angola',
AT: 'Austria',
AZ: 'Azerbaiyán',
BA: 'Bosnia-Herzegovina',
BE: 'Bélgica',
BF: 'Burkina Faso',
BG: 'Bulgaria',
BH: 'Baréin',
BI: 'Burundi',
BJ: 'Benín',
BR: 'Brasil',
CH: 'Suiza',
CI: 'Costa de Marfil',
CM: 'Camerún',
CR: 'Costa Rica',
CV: 'Cabo Verde',
CY: 'Cyprus',
CZ: 'República Checa',
DE: 'Alemania',
DK: 'Dinamarca',
DO: 'República Dominicana',
DZ: 'Argelia',
EE: 'Estonia',
ES: 'España',
FI: 'Finlandia',
FO: 'Islas Feroe',
FR: 'Francia',
GB: 'Reino Unido',
GE: 'Georgia',
GI: 'Gibraltar',
GL: 'Groenlandia',
GR: 'Grecia',
GT: 'Guatemala',
HR: 'Croacia',
HU: 'Hungría',
IE: 'Irlanda',
IL: 'Israel',
IR: 'Iran',
IS: 'Islandia',
IT: 'Italia',
JO: 'Jordania',
KW: 'Kuwait',
KZ: 'Kazajistán',
LB: 'Líbano',
LI: 'Liechtenstein',
LT: 'Lituania',
LU: 'Luxemburgo',
LV: 'Letonia',
MC: 'Mónaco',
MD: 'Moldavia',
ME: 'Montenegro',
MG: 'Madagascar',
MK: 'Macedonia',
ML: 'Malí',
MR: 'Mauritania',
MT: 'Malta',
MU: 'Mauricio',
MZ: 'Mozambique',
NL: 'Países Bajos',
NO: 'Noruega',
PK: 'Pakistán',
PL: 'Poland',
PS: 'Palestina',
PT: 'Portugal',
QA: 'Catar',
RO: 'Rumania',
RS: 'Serbia',
SA: 'Arabia Saudita',
SE: 'Suecia',
SI: 'Eslovenia',
SK: 'Eslovaquia',
SM: 'San Marino',
SN: 'Senegal',
TN: 'Túnez',
TR: 'Turquía',
VG: 'Islas Vírgenes Británicas'
}
},
id: {
'default': 'Por favor introduce un número de identificación válido',
countryNotSupported: 'El código del país %s no esta soportado',
country: 'Por favor introduce un número válido de identificación en %s',
countries: {
BA: 'Bosnia Herzegovina',
BG: 'Bulgaria',
BR: 'Brasil',
CH: 'Suiza',
CL: 'Chile',
CN: 'China',
CZ: 'República Checa',
DK: 'Dinamarca',
EE: 'Estonia',
ES: 'España',
FI: 'Finlandia',
HR: 'Croacia',
IE: 'Irlanda',
IS: 'Islandia',
LT: 'Lituania',
LV: 'Letonia',
ME: 'Montenegro',
MK: 'Macedonia',
NL: 'Países Bajos',
RO: 'Romania',
RS: 'Serbia',
SE: 'Suecia',
SI: 'Eslovenia',
SK: 'Eslovaquia',
SM: 'San Marino',
TH: 'Tailandia',
ZA: 'Sudáfrica'
}
},
identical: {
'default': 'Por favor introduce el mismo valor'
},
imei: {
'default': 'Por favor introduce un número IMEI válido'
},
imo: {
'default': 'Por favor introduce un número IMO válido'
},
integer: {
'default': 'Por favor introduce un número válido'
},
ip: {
'default': 'Por favor introduce una dirección IP válida',
ipv4: 'Por favor introduce una dirección IPv4 válida',
ipv6: 'Por favor introduce una dirección IPv6 válida'
},
isbn: {
'default': 'Por favor introduce un número ISBN válido'
},
isin: {
'default': 'Por favor introduce un número ISIN válido'
},
ismn: {
'default': 'Por favor introduce un número ISMN válido'
},
issn: {
'default': 'Por favor introduce un número ISSN válido'
},
lessThan: {
'default': 'Por favor introduce un valor menor o igual a %s',
notInclusive: 'Por favor introduce un valor menor que %s'
},
mac: {
'default': 'Por favor introduce una dirección MAC válida'
},
meid: {
'default': 'Por favor introduce un número MEID válido'
},
notEmpty: {
'default': 'Por favor introduce un valor'
},
numeric: {
'default': 'Por favor introduce un número decimal válido'
},
phone: {
'default': 'Por favor introduce un número válido de teléfono',
countryNotSupported: 'El código del país %s no está soportado',
country: 'Por favor introduce un número válido de teléfono en %s',
countries: {
BR: 'Brasil',
CN: 'China',
CZ: 'República Checa',
DE: 'Alemania',
DK: 'Dinamarca',
ES: 'España',
FR: 'Francia',
GB: 'Reino Unido',
MA: 'Marruecos',
PK: 'Pakistán',
RO: 'Rumania',
RU: 'Rusa',
SK: 'Eslovaquia',
TH: 'Tailandia',
US: 'Estados Unidos',
VE: 'Venezuela'
}
},
regexp: {
'default': 'Por favor introduce un valor que coincida con el patrón'
},
remote: {
'default': 'Por favor introduce un valor válido'
},
rtn: {
'default': 'Por favor introduce un número RTN válido'
},
sedol: {
'default': 'Por favor introduce un número SEDOL válido'
},
siren: {
'default': 'Por favor introduce un número SIREN válido'
},
siret: {
'default': 'Por favor introduce un número SIRET válido'
},
step: {
'default': 'Por favor introduce un paso válido de %s'
},
stringCase: {
'default': 'Por favor introduce sólo caracteres en minúscula',
upper: 'Por favor introduce sólo caracteres en mayúscula'
},
stringLength: {
'default': 'Por favor introduce un valor con una longitud válida',
less: 'Por favor introduce menos de %s caracteres',
more: 'Por favor introduce más de %s caracteres',
between: 'Por favor introduce un valor con una longitud entre %s y %s caracteres'
},
uri: {
'default': 'Por favor introduce una URI válida'
},
uuid: {
'default': 'Por favor introduce un número UUID válido',
version: 'Por favor introduce una versión UUID válida para %s'
},
vat: {
'default': 'Por favor introduce un número IVA válido',
countryNotSupported: 'El código del país %s no está soportado',
country: 'Por favor introduce un número IVA válido en %s',
countries: {
AT: 'Austria',
BE: 'Bélgica',
BG: 'Bulgaria',
BR: 'Brasil',
CH: 'Suiza',
CY: 'Chipre',
CZ: 'República Checa',
DE: 'Alemania',
DK: 'Dinamarca',
EE: 'Estonia',
ES: 'España',
FI: 'Finlandia',
FR: 'Francia',
GB: 'Reino Unido',
GR: 'Grecia',
EL: 'Grecia',
HU: 'Hungría',
HR: 'Croacia',
IE: 'Irlanda',
IS: 'Islandia',
IT: 'Italia',
LT: 'Lituania',
LU: 'Luxemburgo',
LV: 'Letonia',
MT: 'Malta',
NL: 'Países Bajos',
NO: 'Noruega',
PL: 'Polonia',
PT: 'Portugal',
RO: 'Rumanía',
RU: 'Rusa',
RS: 'Serbia',
SE: 'Suecia',
SI: 'Eslovenia',
SK: 'Eslovaquia',
VE: 'Venezuela',
ZA: 'Sudáfrica'
}
},
vin: {
'default': 'Por favor introduce un número VIN válido'
},
zipCode: {
'default': 'Por favor introduce un código postal válido',
countryNotSupported: 'El código del país %s no está soportado',
country: 'Por favor introduce un código postal válido en %s',
countries: {
AT: 'Austria',
BR: 'Brasil',
CA: 'Canadá',
CH: 'Suiza',
CZ: 'República Checa',
DE: 'Alemania',
DK: 'Dinamarca',
FR: 'Francia',
GB: 'Reino Unido',
IE: 'Irlanda',
IT: 'Italia',
MA: 'Marruecos',
NL: 'Países Bajos',
PT: 'Portugal',
RO: 'Rumanía',
RU: 'Rusa',
SE: 'Suecia',
SG: 'Singapur',
SK: 'Eslovaquia',
US: 'Estados Unidos'
}
}
});
}(window.jQuery));
| Humsen/web/web-pc/WebContent/plugins/validator/js/language/es_ES.js/0 | {
"file_path": "Humsen/web/web-pc/WebContent/plugins/validator/js/language/es_ES.js",
"repo_id": "Humsen",
"token_count": 7827
} | 58 |
(function($) {
/**
* Albanian language package
* Translated by @desaretiuss
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Ju lutem përdorni sistemin e kodimit Base64'
},
between: {
'default': 'Ju lutem vendosni një vlerë midis %s dhe %s',
notInclusive: 'Ju lutem vendosni një vlerë rreptësisht midis %s dhe %s'
},
callback: {
'default': 'Ju lutem vendosni një vlerë të vlefshme'
},
choice: {
'default': 'Ju lutem vendosni një vlerë të vlefshme',
less: 'Ju lutem përzgjidhni së paku %s mundësi',
more: 'Ju lutem përzgjidhni së shumti %s mundësi ',
between: 'Ju lutem përzgjidhni %s - %s mundësi'
},
color: {
'default': 'Ju lutem vendosni një ngjyrë të vlefshme'
},
creditCard: {
'default': 'Ju lutem vendosni një numër karte krediti të vlefshëm'
},
cusip: {
'default': 'Ju lutem vendosni një numër CUSIP të vlefshëm'
},
cvv: {
'default': 'Ju lutem vendosni një numër CVV të vlefshëm'
},
date: {
'default': 'Ju lutem vendosni një datë të saktë',
min: 'Ju lutem vendosni një datë pas %s',
max: 'Ju lutem vendosni një datë para %s',
range: 'Ju lutem vendosni një datë midis %s - %s'
},
different: {
'default': 'Ju lutem vendosni një vlerë tjetër'
},
digits: {
'default': 'Ju lutem vendosni vetëm numra'
},
ean: {
'default': 'Ju lutem vendosni një numër EAN të vlefshëm'
},
emailAddress: {
'default': 'Ju lutem vendosni një adresë email të vlefshme'
},
file: {
'default': 'Ju lutem përzgjidhni një skedar të vlefshëm'
},
greaterThan: {
'default': 'Ju lutem vendosni një vlerë më të madhe ose të barabartë me %s',
notInclusive: 'Ju lutem vendosni një vlerë më të madhe se %s'
},
grid: {
'default': 'Ju lutem vendosni një numër GRId të vlefshëm'
},
hex: {
'default': 'Ju lutem vendosni një numër të saktë heksadecimal'
},
hexColor: {
'default': 'Ju lutem vendosni një ngjyrë të vlefshme heksadecimale'
},
iban: {
'default': 'Ju lutem vendosni një numër IBAN të vlefshëm',
countryNotSupported: 'Kodi i shtetit %s nuk është i mundësuar',
country: 'Ju lutem vendosni një numër IBAN të vlefshëm në %s',
countries: {
AD: 'Andora',
AE: 'Emiratet e Bashkuara Arabe',
AL: 'Shqipëri',
AO: 'Angola',
AT: 'Austri',
AZ: 'Azerbajxhan',
BA: 'Bosnjë dhe Hercegovinë',
BE: 'Belgjikë',
BF: 'Burkina Faso',
BG: 'Bullgari',
BH: 'Bahrein',
BI: 'Burundi',
BJ: 'Benin',
BR: 'Brazil',
CH: 'Zvicër',
CI: 'Bregu i fildishtë',
CM: 'Kamerun',
CR: 'Kosta Rika',
CV: 'Kepi i Gjelbër',
CY: 'Qipro',
CZ: 'Republika Çeke',
DE: 'Gjermani',
DK: 'Danimarkë',
DO: 'Dominika',
DZ: 'Algjeri',
EE: 'Estoni',
ES: 'Spanjë',
FI: 'Finlandë',
FO: 'Ishujt Faroe',
FR: 'Francë',
GB: 'Mbretëria e Bashkuar',
GE: 'Gjeorgji',
GI: 'Gjibraltar',
GL: 'Groenlandë',
GR: 'Greqi',
GT: 'Guatemalë',
HR: 'Kroaci',
HU: 'Hungari',
IE: 'Irlandë',
IL: 'Izrael',
IR: 'Iran',
IS: 'Islandë',
IT: 'Itali',
JO: 'Jordani',
KW: 'Kuvajt',
KZ: 'Kazakistan',
LB: 'Liban',
LI: 'Lihtenshtejn',
LT: 'Lituani',
LU: 'Luksemburg',
LV: 'Letoni',
MC: 'Monako',
MD: 'Moldavi',
ME: 'Mal i Zi',
MG: 'Madagaskar',
MK: 'Maqedoni',
ML: 'Mali',
MR: 'Mauritani',
MT: 'Maltë',
MU: 'Mauricius',
MZ: 'Mozambik',
NL: 'Hollandë',
NO: 'Norvegji',
PK: 'Pakistan',
PL: 'Poloni',
PS: 'Palestinë',
PT: 'Portugali',
QA: 'Katar',
RO: 'Rumani',
RS: 'Serbi',
SA: 'Arabi Saudite',
SE: 'Suedi',
SI: 'Slloveni',
SK: 'Sllovaki',
SM: 'San Marino',
SN: 'Senegal',
TN: 'Tunizi',
TR: 'Turqi',
VG: 'Ishujt Virxhin Britanikë'
}
},
id: {
'default': 'Ju lutem vendosni një numër identifikimi të vlefshëm ',
countryNotSupported: 'Kodi i shtetit %s nuk është i mundësuar',
country: 'Ju lutem vendosni një numër identifikimi të vlefshëm në %s',
countries: {
BA: 'Bosnjë dhe Hercegovinë',
BG: 'Bullgari',
BR: 'Brazil',
CH: 'Zvicër',
CL: 'Kili',
CN: 'Kinë',
CZ: 'Republika Çeke',
DK: 'Danimarkë',
EE: 'Estoni',
ES: 'Spanjë',
FI: 'Finlandë',
HR: 'Kroaci',
IE: 'Irlandë',
IS: 'Islandë',
LT: 'Lituani',
LV: 'Letoni',
ME: 'Mal i Zi',
MK: 'Maqedoni',
NL: 'Hollandë',
RO: 'Rumani',
RS: 'Serbi',
SE: 'Suedi',
SI: 'Slloveni',
SK: 'Slovaki',
SM: 'San Marino',
TH: 'Tajlandë',
ZA: 'Afrikë e Jugut'
}
},
identical: {
'default': 'Ju lutem vendosni të njëjtën vlerë'
},
imei: {
'default': 'Ju lutem vendosni numër IMEI të njëjtë'
},
imo: {
'default': 'Ju lutem vendosni numër IMO të vlefshëm'
},
integer: {
'default': 'Ju lutem vendosni një numër të vlefshëm'
},
ip: {
'default': 'Ju lutem vendosni një adresë IP të vlefshme',
ipv4: 'Ju lutem vendosni një adresë IPv4 të vlefshme',
ipv6: 'Ju lutem vendosni një adresë IPv6 të vlefshme'
},
isbn: {
'default': 'Ju lutem vendosni një numër ISBN të vlefshëm'
},
isin: {
'default': 'Ju lutem vendosni një numër ISIN të vlefshëm'
},
ismn: {
'default': 'Ju lutem vendosni një numër ISMN të vlefshëm'
},
issn: {
'default': 'Ju lutem vendosni një numër ISSN të vlefshëm'
},
lessThan: {
'default': 'Ju lutem vendosni një vlerë më të madhe ose të barabartë me %s',
notInclusive: 'Ju lutem vendosni një vlerë më të vogël se %s'
},
mac: {
'default': 'Ju lutem vendosni një adresë MAC të vlefshme'
},
meid: {
'default': 'Ju lutem vendosni një numër MEID të vlefshëm'
},
notEmpty: {
'default': 'Ju lutem vendosni një vlerë'
},
numeric: {
'default': 'Ju lutem vendosni një numër me presje notuese të saktë'
},
phone: {
'default': 'Ju lutem vendosni një numër telefoni të vlefshëm',
countryNotSupported: 'Kodi i shtetit %s nuk është i mundësuar',
country: 'Ju lutem vendosni një numër telefoni të vlefshëm në %s',
countries: {
BR: 'Brazil',
CN: 'Kinë',
CZ: 'Republika Çeke',
DE: 'Gjermani',
DK: 'Danimarkë',
ES: 'Spanjë',
FR: 'Francë',
GB: 'Mbretëria e Bashkuar',
MA: 'Marok',
PK: 'Pakistan',
RO: 'Rumani',
RU: 'Rusi',
SK: 'Sllovaki',
TH: 'Tajlandë',
US: 'SHBA',
VE: 'Venezuelë'
}
},
regexp: {
'default': 'Ju lutem vendosni një vlerë që përputhet me modelin'
},
remote: {
'default': 'Ju lutem vendosni një vlerë të vlefshme'
},
rtn: {
'default': 'Ju lutem vendosni një numër RTN të vlefshëm'
},
sedol: {
'default': 'Ju lutem vendosni një numër SEDOL të vlefshëm'
},
siren: {
'default': 'Ju lutem vendosni një numër SIREN të vlefshëm'
},
siret: {
'default': 'Ju lutem vendosni një numër SIRET të vlefshëm'
},
step: {
'default': 'Ju lutem vendosni një hap të vlefshëm të %s'
},
stringCase: {
'default': 'Ju lutem përdorni vetëm shenja të vogla të shtypit',
upper: 'Ju lutem përdorni vetëm shenja të mëdha të shtypit'
},
stringLength: {
'default': 'Ju lutem vendosni një vlerë me gjatësinë e duhur',
less: 'Ju lutem vendosni më pak se %s simbole',
more: 'Ju lutem vendosni më shumë se %s simbole',
between: 'Ju lutem vendosni një vlerë me gjatësi midis %s dhe %s simbole'
},
uri: {
'default': 'Ju lutem vendosni një URI të vlefshme'
},
uuid: {
'default': 'Ju lutem vendosni një numër UUID të vlefshëm',
version: 'Ju lutem vendosni një numër UUID version %s të vlefshëm'
},
vat: {
'default': 'Ju lutem vendosni një numër VAT të vlefshëm',
countryNotSupported: 'Kodi i shtetit %s nuk është i mundësuar',
country: 'Ju lutem vendosni një numër VAT të vlefshëm në %s',
countries: {
AT: 'Austri',
BE: 'Belgjikë',
BG: 'Bullgari',
BR: 'Brazil',
CH: 'Zvicër',
CY: 'Qipro',
CZ: 'Republika Çeke',
DE: 'Gjermani',
DK: 'Danimarkë',
EE: 'Estoni',
ES: 'Spanjë',
FI: 'Finlandë',
FR: 'Francë',
GB: 'Mbretëria e Bashkuar',
GR: 'Greqi',
EL: 'Greqi',
HU: 'Hungari',
HR: 'Kroaci',
IE: 'Irlandë',
IS: 'Iclandë',
IT: 'Itali',
LT: 'Lituani',
LU: 'Luksemburg',
LV: 'Letoni',
MT: 'Maltë',
NL: 'Hollandë',
NO: 'Norvegji',
PL: 'Poloni',
PT: 'Portugali',
RO: 'Rumani',
RU: 'Rusi',
RS: 'Serbi',
SE: 'Suedi',
SI: 'Slloveni',
SK: 'Sllovaki',
VE: 'Venezuelë',
ZA: 'Afrikë e Jugut'
}
},
vin: {
'default': 'Ju lutem vendosni një numër VIN të vlefshëm'
},
zipCode: {
'default': 'Ju lutem vendosni një kod postar të vlefshëm',
countryNotSupported: 'Kodi i shtetit %s nuk është i mundësuar',
country: 'Ju lutem vendosni një kod postar të vlefshëm në %s',
countries: {
AT: 'Austri',
BR: 'Brazil',
CA: 'Kanada',
CH: 'Zvicër',
CZ: 'Republika Çeke',
DE: 'Gjermani',
DK: 'Danimarkë',
FR: 'Francë',
GB: 'Mbretëria e Bashkuar',
IE: 'Irlandë',
IT: 'Itali',
MA: 'Marok',
NL: 'Hollandë',
PT: 'Portugali',
RO: 'Rumani',
RU: 'Rusi',
SE: 'Suedi',
SG: 'Singapor',
SK: 'Sllovaki',
US: 'SHBA'
}
}
});
}(window.jQuery));
| Humsen/web/web-pc/WebContent/plugins/validator/js/language/sq_AL.js/0 | {
"file_path": "Humsen/web/web-pc/WebContent/plugins/validator/js/language/sq_AL.js",
"repo_id": "Humsen",
"token_count": 8438
} | 59 |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>联系站长</title>
<meta name="description" content="欢迎来到何明胜的个人网站.本站主要用于记录和分享本人的学习心得和编程经验,并分享常见可复用代码、推荐书籍以及软件等资源.本站源码已托管github,欢迎访问:https://github.com/HelloHusen/web" />
<meta name="keywords" content="何明胜,何明胜的个人网站,何明胜的博客,一格的程序人生" />
<meta name="author" content="何明胜,一格">
<!-- 网站图标 -->
<link rel="shortcut icon" href="/images/favicon.ico">
<!-- jQuery -->
<script src="/plugins/jquery/js/jquery-3.2.1.min.js"></script>
<!-- 自定义css -->
<link rel="stylesheet" href="/css/contact/contact.css">
<!-- 异步发邮件 -->
<script src="/js/contact/contact.js"></script>
</head>
<body>
<input id="menuBarNo" type="hidden" value="5" />
<div id="fh5co-page">
<!-- 左侧导航 -->
<!-- 中间内容 -->
<div id="fh5co-main">
<div class="fh5co-narrow-content animate-box contact-div"
data-animate-effect="fadeInLeft">
<div class="row">
<div class="col-md-4">
<h2>联系站长</h2>
</div>
</div>
<form id="form_contactAdmin">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" placeholder="姓名"
name="contactName">
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="邮箱"
name="contactEmail">
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="电话"
name="contactPhone">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<textarea id="message" cols="30" rows="7" class="form-control"
placeholder="你想说..." name="contactContent"></textarea>
</div>
<div class="form-group">
<input id="btn_sendEmail" type="button"
class="btn btn-primary btn-md" value="发送邮件">
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- 右侧导航 -->
</div>
</body>
</html> | Humsen/web/web-pc/WebContent/topic/contact/contact.html/0 | {
"file_path": "Humsen/web/web-pc/WebContent/topic/contact/contact.html",
"repo_id": "Humsen",
"token_count": 1280
} | 60 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_advanced_search_x2x
#
# Translators:
# Bole <bole@dajmi5.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-03 03:49+0000\n"
"PO-Revision-Date: 2019-11-14 10:34+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
#. module: web_advanced_search
#. odoo-javascript
#: code:addons/web_advanced_search/static/src/js/utils.esm.js:0
#, python-format
msgid " and "
msgstr ""
#. module: web_advanced_search
#. odoo-javascript
#: code:addons/web_advanced_search/static/src/js/utils.esm.js:0
#, python-format
msgid " is not "
msgstr ""
#. module: web_advanced_search
#. odoo-javascript
#: code:addons/web_advanced_search/static/src/js/utils.esm.js:0
#, python-format
msgid " or "
msgstr ""
#. module: web_advanced_search
#. odoo-javascript
#: code:addons/web_advanced_search/static/src/search/filter_menu/advanced_filter_item.xml:0
#, python-format
msgid "Add Advanced Filter"
msgstr "Dodaj napredni filter"
#~ msgid "is in selection"
#~ msgstr "je u odabiru"
| OCA/web/web_advanced_search/i18n/hr.po/0 | {
"file_path": "OCA/web/web_advanced_search/i18n/hr.po",
"repo_id": "OCA",
"token_count": 622
} | 61 |
from . import base
| OCA/web/web_apply_field_style/demo/__init__.py/0 | {
"file_path": "OCA/web/web_apply_field_style/demo/__init__.py",
"repo_id": "OCA",
"token_count": 5
} | 62 |
from . import models
| OCA/web/web_chatter_position/__init__.py/0 | {
"file_path": "OCA/web/web_chatter_position/__init__.py",
"repo_id": "OCA",
"token_count": 5
} | 63 |
#. There's a **Chatter Position** option in **User Preferences**, where you can
choose between ``auto``, ``bottom`` and ``sided``.
| OCA/web/web_chatter_position/readme/USAGE.rst/0 | {
"file_path": "OCA/web/web_chatter_position/readme/USAGE.rst",
"repo_id": "OCA",
"token_count": 37
} | 64 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_company_color
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-08-07 16:10+0000\n"
"Last-Translator: \"Jan Tapper [Onestein]\" <j.tapper@onestein.nl>\n"
"Language-Team: none\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: web_company_color
#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form
msgid ""
"<span class=\"fa fa-info fa-2x me-2\"/>\n"
" In order for the changes to take effect, please "
"refresh\n"
" the page."
msgstr ""
"<span class=\"fa fa-info fa-2x me-2\"/>\n"
" Om de aanpassingen actief te maken, ververs "
"alstublieft\n"
" de pagina."
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg
msgid "Button Background Color"
msgstr ""
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg_hover
msgid "Button Background Color Hover"
msgstr ""
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_text
msgid "Button Text Color"
msgstr ""
#. module: web_company_color
#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form
msgid "Colors"
msgstr ""
#. module: web_company_color
#: model:ir.model,name:web_company_color.model_res_company
msgid "Companies"
msgstr "Bedrijven"
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__company_colors
msgid "Company Colors"
msgstr "Bedrijfskleuren"
#. module: web_company_color
#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form
msgid "Company Styles"
msgstr "Bedrijfsstijlen"
#. module: web_company_color
#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form
msgid "Compute colors from logo"
msgstr "Genereer kleuren vanuit het logo"
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_link_text
msgid "Link Text Color"
msgstr ""
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_link_text_hover
msgid "Link Text Color Hover"
msgstr ""
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_bg
msgid "Navbar Background Color"
msgstr "Navigatiebalk Achtergrondkleur"
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_bg_hover
msgid "Navbar Background Color Hover"
msgstr "Navigatiebalk Achtergrondkleur (als je de muis er overheen beweegt)"
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_text
msgid "Navbar Text Color"
msgstr "Navigatiebalk Tekstkleuren"
#. module: web_company_color
#: model:ir.model,name:web_company_color.model_ir_qweb
msgid "Qweb"
msgstr "Qweb"
#. module: web_company_color
#: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp
msgid "SCSS Modif. Timestamp"
msgstr ""
#~ msgid "Navbar Colors"
#~ msgstr "Navigatiebalk Kleuren"
#~ msgid ""
#~ "<span class=\"fa fa-info fa-2x\"/>\n"
#~ " In order for the changes to take effect, please "
#~ "refresh\n"
#~ " the page."
#~ msgstr ""
#~ "<span class=\"fa fa-info fa-2x\"/>\n"
#~ " Ververs de pagina om de wijzigingen door te "
#~ "voeren."
| OCA/web/web_company_color/i18n/nl.po/0 | {
"file_path": "OCA/web/web_company_color/i18n/nl.po",
"repo_id": "OCA",
"token_count": 1575
} | 65 |
# Copyright 2019 Alexandre Díaz <dev@redneboa.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import base64
import math
from io import BytesIO
from PIL import Image
def n_rgb_to_hex(_r, _g, _b):
return "#{:02x}{:02x}{:02x}".format(int(255 * _r), int(255 * _g), int(255 * _b))
def convert_to_image(field_binary):
return Image.open(BytesIO(base64.b64decode(field_binary)))
def image_to_rgb(img):
def normalize_vec3(vec3):
_l = 1.0 / math.sqrt(vec3[0] * vec3[0] + vec3[1] * vec3[1] + vec3[2] * vec3[2])
return (vec3[0] * _l, vec3[1] * _l, vec3[2] * _l)
# Force Alpha Channel
if img.mode != "RGBA":
img = img.convert("RGBA")
width, height = img.size
# Reduce pixels
width, height = (max(1, int(width / 4)), max(1, int(height / 4)))
img = img.resize((width, height))
rgb_sum = [0, 0, 0]
# Mix. image colors using addition method
RGBA_WHITE = (255, 255, 255, 255)
for i in range(0, height * width):
rgba = img.getpixel((i % width, i / width))
if rgba[3] > 128 and rgba != RGBA_WHITE:
rgb_sum[0] += rgba[0]
rgb_sum[1] += rgba[1]
rgb_sum[2] += rgba[2]
_r, _g, _b = normalize_vec3(rgb_sum)
return (_r, _g, _b)
| OCA/web/web_company_color/utils.py/0 | {
"file_path": "OCA/web/web_company_color/utils.py",
"repo_id": "OCA",
"token_count": 605
} | 66 |
=========
Dark Mode
=========
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:92c42b374159b10469f7a113505b270486a72f4a3bec1552c591c18146e82035
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/16.0/web_dark_mode
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_dark_mode
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This modules offers the dark mode for Odoo CE. The dark mode can be activated by
every user in the user menu in the top right.
**Table of contents**
.. contents::
:local:
Known issues / Roadmap
======================
- Implement dark mode for PoS with a glue module
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_dark_mode%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* initOS GmbH
Contributors
~~~~~~~~~~~~
* Florian Kantelberg <florian.kantelberg@initos.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_dark_mode>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
| OCA/web/web_dark_mode/README.rst/0 | {
"file_path": "OCA/web/web_dark_mode/README.rst",
"repo_id": "OCA",
"token_count": 1023
} | 67 |
- Implement dark mode for PoS with a glue module
| OCA/web/web_dark_mode/readme/ROADMAP.rst/0 | {
"file_path": "OCA/web/web_dark_mode/readme/ROADMAP.rst",
"repo_id": "OCA",
"token_count": 12
} | 68 |
from . import tile_tile
from . import tile_category
| OCA/web/web_dashboard_tile/models/__init__.py/0 | {
"file_path": "OCA/web/web_dashboard_tile/models/__init__.py",
"repo_id": "OCA",
"token_count": 14
} | 69 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_dialog_size
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-09-01 12:52+0000\n"
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"
#. module: web_dialog_size
#: model:ir.model,name:web_dialog_size.model_ir_config_parameter
msgid "System Parameter"
msgstr "系统参数"
| OCA/web/web_dialog_size/i18n/zh_CN.po/0 | {
"file_path": "OCA/web/web_dialog_size/i18n/zh_CN.po",
"repo_id": "OCA",
"token_count": 286
} | 70 |
from . import test_web_dialog_size
| OCA/web/web_dialog_size/tests/__init__.py/0 | {
"file_path": "OCA/web/web_dialog_size/tests/__init__.py",
"repo_id": "OCA",
"token_count": 12
} | 71 |
The standard grants/prevents access to any UI export via *Access to export feature*
group.
This module adds a new group for the 'Direct Export (xlsx)' feature, leaving the
standard one for only the 'Export All' feature.
Admin users can always use the export option.
| OCA/web/web_disable_export_group/readme/DESCRIPTION.rst/0 | {
"file_path": "OCA/web/web_disable_export_group/readme/DESCRIPTION.rst",
"repo_id": "OCA",
"token_count": 67
} | 72 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_environment_ribbon
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-08-04 17:44+0000\n"
"Last-Translator: eduardgm <eduard.garcia@qubiq.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"
#. module: web_environment_ribbon
#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend
msgid "Web Environment Ribbon Backend"
msgstr "Backend \"Web Environment Ribbon\""
#~ msgid "Display Name"
#~ msgstr "Nombre mostrado"
#~ msgid "ID"
#~ msgstr "ID"
#~ msgid "Last Modified on"
#~ msgstr "Última modificación el"
| OCA/web/web_environment_ribbon/i18n/es.po/0 | {
"file_path": "OCA/web/web_environment_ribbon/i18n/es.po",
"repo_id": "OCA",
"token_count": 356
} | 73 |
Mark a Test Environment with a red ribbon on the top left corner in every page
| OCA/web/web_environment_ribbon/readme/DESCRIPTION.rst/0 | {
"file_path": "OCA/web/web_environment_ribbon/readme/DESCRIPTION.rst",
"repo_id": "OCA",
"token_count": 17
} | 74 |
* Mantavya Gajjar <mga@openerp.com>
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* Jay Vora (SerpentCS) for their alternative implementation
* Jan Verbeek <jverbeek@therp.nl>
* Manuel Calero <manuelcalerosolis@gmail.com>
* Alvaro Estebanez (brain-tec AG) <alvaro.estebanez@bt-group.com>
* Mayank Patel <mayankpatel3555@gmail.com>
| OCA/web/web_group_expand/readme/CONTRIBUTORS.rst/0 | {
"file_path": "OCA/web/web_group_expand/readme/CONTRIBUTORS.rst",
"repo_id": "OCA",
"token_count": 163
} | 75 |
**Demo:**
.. image:: ../static/description/demo.gif
You can see the demo live by going to the users list view (Settings > Users & Companies > Users)
and clicking the little '?' next to the view switcher.
.. image:: ../static/description/viewswitcher.png
Also there's a demo for the change password wizard:
.. image:: ../static/description/changepassword.png
It's easy to create your own guides, please refer to ``static/src/user_trip.esm.js`` and
``static/src/change_password_trip.esm.js``
| OCA/web/web_help/readme/USAGE.rst/0 | {
"file_path": "OCA/web/web_help/readme/USAGE.rst",
"repo_id": "OCA",
"token_count": 147
} | 76 |
========================
Web hide field with keys
========================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2f9505d660c7b606386565a2d225a9b3c971cc9e8346f7514ed98753d03b3225
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/16.0/web_hide_field_with_key
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_hide_field_with_key
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This allows to hide field by pressing the "p" key on the keyboard
**Table of contents**
.. contents::
:local:
Usage
=====
Add the class web-hide-field to a field:
::
<field name="name" class="web-hide-field">
Then press the "p" key and the field will disappear
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_hide_field_with_key%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* Francois Poizat <francois.poizat@gmail.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
.. |maintainer-franzpoize| image:: https://github.com/franzpoize.png?size=40px
:target: https://github.com/franzpoize
:alt: franzpoize
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-franzpoize|
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_hide_field_with_key>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
| OCA/web/web_hide_field_with_key/README.rst/0 | {
"file_path": "OCA/web/web_hide_field_with_key/README.rst",
"repo_id": "OCA",
"token_count": 1164
} | 77 |
This module allows to show a message popup on the client side as result of a button.
| OCA/web/web_ir_actions_act_window_message/readme/DESCRIPTION.rst/0 | {
"file_path": "OCA/web/web_ir_actions_act_window_message/readme/DESCRIPTION.rst",
"repo_id": "OCA",
"token_count": 19
} | 78 |
# Copyright 2023 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import ir_actions_act_window_page
| OCA/web/web_ir_actions_act_window_page/models/__init__.py/0 | {
"file_path": "OCA/web/web_ir_actions_act_window_page/models/__init__.py",
"repo_id": "OCA",
"token_count": 50
} | 79 |
* Dennis Sluijk <d.sluijk@onestein.nl>
* Aldo Soares <soares_aldo@hotmail.com>
* `Tecnativa <https://www.tecnativa.com>`_:
* Ernesto Tejeda
* Nilesh Sheliya <nilesh@synodica.com>
| OCA/web/web_listview_range_select/readme/CONTRIBUTORS.rst/0 | {
"file_path": "OCA/web/web_listview_range_select/readme/CONTRIBUTORS.rst",
"repo_id": "OCA",
"token_count": 85
} | 80 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-03 03:50+0000\n"
"PO-Revision-Date: 2024-02-02 11:35+0000\n"
"Last-Translator: Hughes Damry <hughes@damry.org>\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid ", are you sure it does not exist yet?"
msgstr ", êtes-vous sûr qu'il n'existe pas déjà ?"
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "Create"
msgstr "Créer"
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Create \"%s\""
msgstr ""
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "Create and Edit"
msgstr "Créer et Modifier"
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Create and edit..."
msgstr "Créer et modifier..."
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "Discard"
msgstr ""
#. module: web_m2x_options
#: model:ir.model,name:web_m2x_options.model_ir_http
msgid "HTTP Routing"
msgstr ""
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/form.esm.js:0
#, python-format
msgid "New: %s"
msgstr ""
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "No records"
msgstr ""
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/form.esm.js:0
#, python-format
msgid "Open: "
msgstr "Ouvrir : "
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Search More..."
msgstr "Rechercher plus..."
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Start typing..."
msgstr ""
#. module: web_m2x_options
#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
msgid "System Parameter"
msgstr "Paramètres système"
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "You are creating a new"
msgstr "Vous créez un nouveau"
#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "as a new"
msgstr ""
#, python-format
#~ msgid "Cancel"
#~ msgstr "Annuler"
#, python-format
#~ msgid "Create \"<strong>%s</strong>\""
#~ msgstr "Creer \"<strong>%s</strong>\""
#, python-format
#~ msgid "Create a %s"
#~ msgstr "Créer un %s"
#, python-format
#~ msgid "Create and Edit..."
#~ msgstr "Créer et modifier..."
#, python-format
#~ msgid "Create and edit"
#~ msgstr "Créer et modifier"
#, python-format
#~ msgid "No results to show..."
#~ msgstr "Aucun résultat à afficher..."
#, python-format
#~ msgid "Quick search: %s"
#~ msgstr "Recherche rapide: %s"
#, python-format
#~ msgid "You are creating a new %s, are you sure it does not exist yet?"
#~ msgstr ""
#~ "Vous créez un nouveau %s, est-ce que vous êtes sur qu'il n'existe pas "
#~ "déjà ?"
#~ msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
#~ msgstr "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
| OCA/web/web_m2x_options/i18n/fr.po/0 | {
"file_path": "OCA/web/web_m2x_options/i18n/fr.po",
"repo_id": "OCA",
"token_count": 1700
} | 81 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_notify
#
# Translators:
# Peter Hageman <hageman.p@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-13 16:07+0000\n"
"PO-Revision-Date: 2017-07-13 16:07+0000\n"
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n"
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
"teams/23907/nl_NL/)\n"
"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_notify
#. odoo-python
#: code:addons/web_notify/models/res_users.py:0
#, python-format
msgid "Danger"
msgstr ""
#. module: web_notify
#. odoo-python
#: code:addons/web_notify/models/res_users.py:0
#, python-format
msgid "Default"
msgstr ""
#. module: web_notify
#. odoo-python
#: code:addons/web_notify/models/res_users.py:0
#, python-format
msgid "Information"
msgstr "Informatie"
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name
msgid "Notify Danger Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name
msgid "Notify Default Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name
msgid "Notify Info Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name
msgid "Notify Success Channel Name"
msgstr ""
#. module: web_notify
#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name
msgid "Notify Warning Channel Name"
msgstr ""
#. module: web_notify
#. odoo-python
#: code:addons/web_notify/models/res_users.py:0
#, python-format
msgid "Sending a notification to another user is forbidden."
msgstr ""
#. module: web_notify
#. odoo-python
#: code:addons/web_notify/models/res_users.py:0
#, python-format
msgid "Success"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test danger notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test default notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test info notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test success notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test warning notification"
msgstr ""
#. module: web_notify
#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit
msgid "Test web notify"
msgstr ""
#. module: web_notify
#: model:ir.model,name:web_notify.model_res_users
msgid "User"
msgstr ""
#. module: web_notify
#. odoo-python
#: code:addons/web_notify/models/res_users.py:0
#, python-format
msgid "Warning"
msgstr "Waarschuwing"
#~ msgid "Users"
#~ msgstr "Gebruikers"
| OCA/web/web_notify/i18n/nl_NL.po/0 | {
"file_path": "OCA/web/web_notify/i18n/nl_NL.po",
"repo_id": "OCA",
"token_count": 1322
} | 82 |
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import test_res_users
| OCA/web/web_notify/tests/__init__.py/0 | {
"file_path": "OCA/web/web_notify/tests/__init__.py",
"repo_id": "OCA",
"token_count": 36
} | 83 |
from . import test_notify_channel_message
| OCA/web/web_notify_channel_message/tests/__init__.py/0 | {
"file_path": "OCA/web/web_notify_channel_message/tests/__init__.py",
"repo_id": "OCA",
"token_count": 12
} | 84 |
#add_computed_measure_wrapper {
padding: 0 20px;
min-width: 300px;
white-space: nowrap;
.d-table-cell {
vertical-align: middle;
padding: 3px 0;
}
}
| OCA/web/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.scss/0 | {
"file_path": "OCA/web/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.scss",
"repo_id": "OCA",
"token_count": 90
} | 85 |
# Copyright 2020 Lorenzo Battistini @ TAKOBI
# Copyright 2020 Tecnativa - Alexandre D. Díaz
# Copyright 2020 Tecnativa - João Marques
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
import json
from odoo.http import Controller, request, route
class PWA(Controller):
def _get_pwa_scripts(self):
"""Scripts to be imported in the service worker (Order is important)"""
return [
"/web/static/lib/underscore/underscore.js",
"/web_pwa_oca/static/src/js/worker/jquery-sw-compat.js",
"/web/static/src/legacy/js/promise_extension.js",
"/web/static/src/boot.js",
"/web/static/src/legacy/js/core/class.js",
"/web_pwa_oca/static/src/js/worker/pwa.js",
]
@route("/service-worker.js", type="http", auth="public")
def render_service_worker(self):
"""Route to register the service worker in the 'main' scope ('/')"""
return request.render(
"web_pwa_oca.service_worker",
{
"pwa_scripts": self._get_pwa_scripts(),
"pwa_params": self._get_pwa_params(),
},
headers=[("Content-Type", "text/javascript;charset=utf-8")],
)
def _get_pwa_params(self):
"""Get javascript PWA class initialzation params"""
return {}
def _get_pwa_manifest_icons(self, pwa_icon):
icons = []
if not pwa_icon:
for size in [
(128, 128),
(144, 144),
(152, 152),
(192, 192),
(256, 256),
(512, 512),
]:
icons.append(
{
"src": "/web_pwa_oca/static/img/icons/icon-%sx%s.png"
% (str(size[0]), str(size[1])),
"sizes": "{}x{}".format(str(size[0]), str(size[1])),
"type": "image/png",
"purpose": "any maskable",
}
)
elif not pwa_icon.mimetype.startswith("image/svg"):
all_icons = (
request.env["ir.attachment"]
.sudo()
.search(
[
("url", "like", "/web_pwa_oca/icon"),
(
"url",
"not like",
"/web_pwa_oca/icon.",
), # Get only resized icons
]
)
)
for icon in all_icons:
icon_size_name = icon.url.split("/")[-1].lstrip("icon").split(".")[0]
icons.append(
{"src": icon.url, "sizes": icon_size_name, "type": icon.mimetype}
)
else:
icons = [
{
"src": pwa_icon.url,
"sizes": "128x128 144x144 152x152 192x192 256x256 512x512",
"type": pwa_icon.mimetype,
}
]
return icons
def _get_pwa_manifest(self):
"""Webapp manifest"""
config_param_sudo = request.env["ir.config_parameter"].sudo()
pwa_name = config_param_sudo.get_param("pwa.manifest.name", "Odoo PWA")
pwa_short_name = config_param_sudo.get_param(
"pwa.manifest.short_name", "Odoo PWA"
)
pwa_icon = (
request.env["ir.attachment"]
.sudo()
.search([("url", "like", "/web_pwa_oca/icon.")])
)
background_color = config_param_sudo.get_param(
"pwa.manifest.background_color", "#2E69B5"
)
theme_color = config_param_sudo.get_param("pwa.manifest.theme_color", "#2E69B5")
return {
"name": pwa_name,
"short_name": pwa_short_name,
"icons": self._get_pwa_manifest_icons(pwa_icon),
"start_url": "/web",
"display": "standalone",
"background_color": background_color,
"theme_color": theme_color,
}
@route("/web_pwa_oca/manifest.webmanifest", type="http", auth="public")
def pwa_manifest(self):
"""Returns the manifest used to install the page as app"""
return request.make_response(
json.dumps(self._get_pwa_manifest()),
headers=[("Content-Type", "application/json;charset=utf-8")],
)
| OCA/web/web_pwa_oca/controllers/main.py/0 | {
"file_path": "OCA/web/web_pwa_oca/controllers/main.py",
"repo_id": "OCA",
"token_count": 2482
} | 86 |
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.pwa</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
<field name="arch" type="xml">
<div id="emails" position='after'>
<h2>Progressive Web App</h2>
<div class="row mt16 o_settings_container" id="pwa_settings">
<div class="col-12 col-lg-6 o_setting_box" id="domain_setting">
<div class="o_setting_right_pane">
<label for="pwa_name" string="PWA Title" />
<span
class="fa fa-lg fa-globe"
title="Icon next to name"
/>
<div class="text-muted">
Name and icon of your PWA
</div>
<div class="content-group">
<div class="row mt16">
<label
class="col-lg-3 o_light_label"
string="Name"
for="pwa_name"
/>
<field name="pwa_name" />
</div>
<div class="row mt16">
<label
class="col-lg-3 o_light_label"
string="Short Name"
for="pwa_short_name"
/>
<field name="pwa_short_name" />
</div>
<div class="row">
<label
class="col-lg-3 o_light_label"
for="pwa_background_color"
/>
<field name="pwa_background_color" />
</div>
<div class="row">
<label
class="col-lg-3 o_light_label"
for="pwa_theme_color"
/>
<field name="pwa_theme_color" />
</div>
<div class="row">
<label
class="col-lg-3 o_light_label"
for="pwa_icon"
/>
<field
name="pwa_icon"
widget="image"
class="float-left oe_avatar"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</field>
</record>
</odoo>
| OCA/web/web_pwa_oca/views/res_config_settings_views.xml/0 | {
"file_path": "OCA/web/web_pwa_oca/views/res_config_settings_views.xml",
"repo_id": "OCA",
"token_count": 2711
} | 87 |
/** @odoo-module **/
/* Copyright 2024 Tecnativa - Carlos Roca
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
import {ControlPanel} from "@web/search/control_panel/control_panel";
import {Refresher} from "./refresher.esm";
ControlPanel.components = Object.assign({}, ControlPanel.components, {
Refresher,
});
| OCA/web/web_refresher/static/src/js/control_panel.esm.js/0 | {
"file_path": "OCA/web/web_refresher/static/src/js/control_panel.esm.js",
"repo_id": "OCA",
"token_count": 114
} | 88 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_responsive
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-08-08 23:07+0000\n"
"Last-Translator: Jacek Michalski <michalski.jck@gmail.com>\n"
"Language-Team: none\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.3.2\n"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0
#, python-format
msgid "Activities"
msgstr ""
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/search_panel/search_panel.xml:0
#, python-format
msgid "All"
msgstr "Wszystkie"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0
#, python-format
msgid "Attachment counter loading..."
msgstr ""
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0
#, python-format
msgid "Attachments"
msgstr ""
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/control_panel/control_panel.xml:0
#, python-format
msgid "CLEAR"
msgstr "WYCZYŚĆ"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0
#, python-format
msgid "Discard"
msgstr "Odrzuć"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/control_panel/control_panel.xml:0
#: code:addons/web_responsive/static/src/components/search_panel/search_panel.xml:0
#, python-format
msgid "FILTER"
msgstr "FILTRUJ"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/apps_menu/apps_menu.xml:0
#, python-format
msgid "Home Menu"
msgstr ""
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0
#, python-format
msgid "Log note"
msgstr ""
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml:0
#, python-format
msgid "Maximize"
msgstr "Zmaksymalizuj"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml:0
#, python-format
msgid "Minimize"
msgstr "Zminimalizuj"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0
#, python-format
msgid "New"
msgstr ""
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/control_panel/control_panel.xml:0
#: code:addons/web_responsive/static/src/components/search_panel/search_panel.xml:0
#, python-format
msgid "SEE RESULT"
msgstr "ZOBACZ WYNIK"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0
#, python-format
msgid "Save"
msgstr "Zapisz"
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/apps_menu/apps_menu.xml:0
#, python-format
msgid "Search menus..."
msgstr "Przeszukaj menu..."
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/control_panel/control_panel.xml:0
#, python-format
msgid "Search..."
msgstr "Szukaj..."
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0
#, python-format
msgid "Send message"
msgstr ""
#. module: web_responsive
#. odoo-javascript
#: code:addons/web_responsive/static/src/components/control_panel/control_panel.xml:0
#, python-format
msgid "View switcher"
msgstr "Przełącznik widoku"
#, python-format
#~ msgid "Create"
#~ msgstr "Utwórz"
#~ msgid "Chatter Position"
#~ msgstr "Pozycja Czatu"
#, python-format
#~ msgid "Clear"
#~ msgstr "Wyczyść"
#, python-format
#~ msgid "Edit"
#~ msgstr "Edytuj"
#~ msgid "Normal"
#~ msgstr "Normalna"
#, python-format
#~ msgid "Quick actions"
#~ msgstr "Szybkie akcje"
#~ msgid "Sided"
#~ msgstr "Z boku"
#, python-format
#~ msgid "Today"
#~ msgstr "Dzisiaj"
#, python-format
#~ msgid "Undefined"
#~ msgstr "Niezdefiniowane"
#~ msgid "Users"
#~ msgstr "Użytkownicy"
#~ msgid "fade"
#~ msgstr "wygasanie"
| OCA/web/web_responsive/i18n/pl.po/0 | {
"file_path": "OCA/web/web_responsive/i18n/pl.po",
"repo_id": "OCA",
"token_count": 1808
} | 89 |
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2021 Sergey Shebanin
Copyright 2023 Onestein - Anjeel Haria
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<templates>
<!-- Legacy control panel templates -->
<t t-inherit="web.Legacy.ControlPanel" t-inherit-mode="extension" owl="1">
<xpath expr="//nav[hasclass('o_cp_switch_buttons')]" position="replace">
<t t-if="props.views.length gt 1">
<t t-if="ui.size lt= ui.SIZES.LG">
<Dropdown
position="'bottom-end'"
menuClass="'d-inline-flex o_cp_switch_buttons'"
togglerClass="'btn btn-link'"
>
<t t-set-slot="toggler">
<i
class="fa fa-lg o_switch_view"
t-attf-class="o_{{env.view.type}} {{env.view.icon}} {{ props.views.filter(view => view.type === env.view.type)[0].icon }} {{env.view.active ? 'active' : ''}}"
/>
</t>
<t t-foreach="props.views" t-as="view" t-key="view.type">
<t t-call="web.ViewSwitcherButton" />
</t>
</Dropdown>
</t>
<t t-else="">
<nav
class="btn-group o_cp_switch_buttons"
role="toolbar"
aria-label="View switcher"
>
<t t-foreach="props.views" t-as="view" t-key="view.type">
<t t-call="web.ViewSwitcherButton" />
</t>
</nav>
</t>
</t>
</xpath>
<xpath expr="//div[hasclass('o_searchview')]" position="replace">
<div
t-if="props.withSearchBar"
class="o_searchview"
t-att-class="state.mobileSearchMode == 'quick' ? 'o_searchview_quick' : 'o_searchview_mobile'"
role="search"
aria-autocomplete="list"
t-on-click.self="() => { state.mobileSearchMode = ui.isSmall ? 'quick' : '' }"
>
<t t-if="!ui.isSmall">
<i
class="o_searchview_icon fa fa-search"
title="Search..."
role="img"
aria-label="Search..."
/>
<SearchBar fields="fields" />
</t>
<t t-if="ui.isSmall">
<t t-if="state.mobileSearchMode == 'quick'">
<button
t-if="props.withBreadcrumbs"
class="btn btn-link fa fa-arrow-left"
t-on-click.stop="() => { state.mobileSearchMode = '' }"
/>
<SearchBar fields="fields" />
<button
class="btn fa fa-filter"
t-on-click.stop="() => { state.mobileSearchMode = 'full' }"
/>
</t>
<t
t-if="state.mobileSearchMode == 'full'"
t-call="web_responsive.LegacyMobileSearchView"
/>
<t t-if="state.mobileSearchMode == ''">
<button
class="btn btn-link fa fa-search"
t-on-click.stop="() => { state.mobileSearchMode = 'quick' }"
/>
</t>
</t>
</div>
</xpath>
<xpath expr="//div[hasclass('o_cp_top_left')]" position="attributes">
<attribute
name="t-att-class"
t-translation="off"
>ui.isSmall and state.mobileSearchMode == 'quick' ? 'o_hidden' : ''</attribute>
</xpath>
<xpath expr="//div[hasclass('o_search_options')]" position="attributes">
<attribute name="t-if" t-translation="off">!ui.isSmall</attribute>
<attribute
name="t-att-class"
t-translation="off"
>ui.size == ui.SIZES.MD ? 'o_search_options_hide_labels' : ''</attribute>
</xpath>
</t>
<t t-name="web_responsive.LegacyMobileSearchView" owl="1">
<div class="o_cp_mobile_search">
<div class="o_mobile_search_header">
<button
type="button"
class="o_mobile_search_button btn"
t-on-click="() => state.mobileSearchMode = false"
>
<i class="fa fa-arrow-left" />
<strong class="ms-2">FILTER</strong>
</button>
<button
type="button"
class="o_mobile_search_button btn"
t-on-click="() => this.model.dispatch('clearQuery')"
>
CLEAR
</button>
</div>
<SearchBar fields="fields" />
<div class="o_mobile_search_filter o_search_options mb8 mt8 ml16 mr16">
<FilterMenu
t-if="props.searchMenuTypes.includes('filter')"
class="o_filter_menu"
fields="fields"
/>
<GroupByMenu
t-if="props.searchMenuTypes.includes('groupBy')"
class="o_group_by_menu"
fields="fields"
/>
<ComparisonMenu
t-if="props.searchMenuTypes.includes('comparison') and model.get('filters', f => f.type === 'comparison').length"
class="o_comparison_menu"
/>
<FavoriteMenu
t-if="props.searchMenuTypes.includes('favorite')"
class="o_favorite_menu"
/>
</div>
<div
class="btn btn-primary o_mobile_search_show_result fixed-bottom"
t-on-click="() => { state.mobileSearchMode = (props.withBreadcrumbs ? '' : 'quick') }"
>
<t>SEE RESULT</t>
</div>
</div>
</t>
<t t-name="web_responsive.SearchBar" owl="1">
<div>
<t t-if="!env.isSmall" t-call="web.SearchBar" />
<t t-if="env.isSmall">
<t t-if="props.mobileSearchMode == 'quick'">
<div class="o_searchview o_searchview_quick">
<button
t-if="props.withBreadcrumbs"
class="btn btn-link fa fa-arrow-left"
t-on-click.stop="() => this.trigger('set-mobile-view', '')"
/>
<div class="o_searchview_input_container">
<t t-call="web.SearchBar.Facets" />
<t t-call="web.SearchBar.Input" />
<t t-if="items.length">
<t t-call="web.SearchBar.Items" />
</t>
</div>
<button
class="btn fa fa-filter"
t-on-click.stop="() => this.trigger('set-mobile-view', 'full')"
/>
</div>
</t>
<t
t-if="props.mobileSearchMode == 'full'"
t-call="web_responsive.MobileSearchView"
/>
<t t-if="props.mobileSearchMode == ''">
<div
class="o_searchview o_searchview_mobile"
role="search"
aria-autocomplete="list"
t-on-click.stop="() => this.trigger('set-mobile-view', 'quick')"
>
<button class="btn btn-link fa fa-search" />
</div>
</t>
</t>
</div>
</t>
<t t-name="web_responsive.MobileSearchView" owl="1">
<div class="o_searchview">
<div class="o_cp_mobile_search">
<div class="o_mobile_search_header">
<span
class="o_mobile_search_close float-left mt16 mb16 mr8 ml16"
t-on-click.stop="() => this.trigger('set-mobile-view', 'quick')"
>
<i class="fa fa-arrow-left" />
<strong class="float-right ml8">FILTER</strong>
</span>
<span
class="float-right o_mobile_search_clear_facets mt16 mr16"
t-on-click.stop="() => env.searchModel.clearQuery()"
>
<t>CLEAR</t>
</span>
</div>
<div class="o_searchview_input_container">
<t t-call="web.SearchBar.Facets" />
<t t-call="web.SearchBar.Input" />
<t t-if="items.length">
<t t-call="web.SearchBar.Items" />
</t>
</div>
<div class="o_mobile_search_filter o_search_options mb8 mt8 ml16 mr16">
<t t-foreach="props.searchMenus" t-as="menu" t-key="menu.key">
<t t-component="menu.Component" />
</t>
</div>
<div
class="btn btn-primary o_mobile_search_show_result fixed-bottom"
t-on-click.stop="() => this.trigger('set-mobile-view', '')"
>
<t>SEE RESULT</t>
</div>
</div>
</div>
</t>
</templates>
| OCA/web/web_responsive/static/src/components/control_panel/control_panel.xml/0 | {
"file_path": "OCA/web/web_responsive/static/src/components/control_panel/control_panel.xml",
"repo_id": "OCA",
"token_count": 6288
} | 90 |
======================
Save & Discard Buttons
======================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dd9062d415006fd0e96b895dd0d272f8b09c81b737731e6fc7e67cf1aab60485
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/16.0/web_save_discard_button
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_save_discard_button
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
Change Save & Discard Button style.
.. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_save_discard_button/static/description/save_button.png
**Table of contents**
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_save_discard_button%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Synconics Technologies Pvt. Ltd.
Contributors
~~~~~~~~~~~~
* Synconics Technologies Pvt. Ltd.
* `Synconics Technologies Pvt. Ltd. <https://www.synconics.com>`__:
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
.. |maintainer-synconics| image:: https://github.com/synconics.png?size=40px
:target: https://github.com/synconics
:alt: synconics
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-synconics|
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_save_discard_button>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
| OCA/web/web_save_discard_button/README.rst/0 | {
"file_path": "OCA/web/web_save_discard_button/README.rst",
"repo_id": "OCA",
"token_count": 1156
} | 91 |
====================================
Use AND conditions on omnibar search
====================================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9883b3e6c2eee5ca7247857cac8362cc3fbc80a0fa0ec270749365ad1ed66832
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/16.0/web_search_with_and
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_search_with_and
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
When searching for records on same field Odoo joins multiple queries with OR.
For example:
* Perform a search for customer "John" on field Name
* Odoo displays customers containing "John"
* Search for "Smith" on same field Name
* Odoo displays customers containing "John" OR "Smith"
With this module installed you can press Shift key before searching for "Smith"
and Odoo finds customers containing "John" AND "Smith"
**Table of contents**
.. contents::
:local:
Usage
=====
* Enter your value in omnibar search field
* Press and hold Shift key
* Select field with mouse or keyboard to perform search on
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/162/11.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_search_with_and%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Sandip SCS
* Versada UAB
* ACSONE SA/NV
* Serincloud
Contributors
~~~~~~~~~~~~
* Andrius Preimantas <andrius@versada.lt>
* Adrien Didenot <adrien.didenot@horanet.com>
* Francesco Apruzzese <f.apruzzese@apuliasoftware.it>
* Numigi (tm) and all its contributors (https://bit.ly/numigiens)
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
* Pedro Guirao <pedro.guirao@ingenieriacloud.com>
* Nedas Žilinskas <nedas.zilinskas@avoin.systems>
* Sandip SerpentCS <sandip.v.serpentcs@gmail.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_search_with_and>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
| OCA/web/web_search_with_and/README.rst/0 | {
"file_path": "OCA/web/web_search_with_and/README.rst",
"repo_id": "OCA",
"token_count": 1366
} | 92 |
# Copyright 2023 Camptocamp SA - Telmo Santos
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Web Select All Companies",
"summary": "Allows you to select all companies in one click.",
"version": "16.0.1.0.1",
"category": "Web",
"website": "https://github.com/OCA/web",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "LGPL-3",
"depends": ["web"],
"assets": {
"web.assets_backend": [
"web_select_all_companies/static/src/scss/switch_all_company_menu.scss",
"web_select_all_companies/static/src/xml/switch_all_company_menu.xml",
"web_select_all_companies/static/src/js/switch_all_company_menu.esm.js",
],
},
"installable": True,
}
| OCA/web/web_select_all_companies/__manifest__.py/0 | {
"file_path": "OCA/web/web_select_all_companies/__manifest__.py",
"repo_id": "OCA",
"token_count": 337
} | 93 |
#. module: web_send_message_popup
#. odoo-javascript
#: code:addons/web_send_message_popup/static/src/models/chatter/chatter.esm.js:0
#, python-format
msgid "Compose Email"
msgstr ""
| OCA/web/web_send_message_popup/i18n/fa.po/0 | {
"file_path": "OCA/web/web_send_message_popup/i18n/fa.po",
"repo_id": "OCA",
"token_count": 71
} | 94 |
/***********************************************************
Variables
************************************************************/
$input-border-color: #cccccc;
$input-border-color-focus: #71639e;
$input-background-color-required: #d2d2ff;
$input-color-placeholder-required: #6c757d;
$button-border-color: #dee2e6;
/***********************************************************
Form View : Handle Fields Borders
************************************************************/
.o_input,
.o_field_html > .note-editable {
/* Add border for all editable fields */
border: 1px solid $input-border-color !important;
border-radius: 3px;
/* add darker border on focus */
&:focus {
border-color: $input-border-color-focus !important;
}
}
.o_field_many2many_selection {
.o_input {
/* Prevent to have double border for many2many tags input fields */
border: 0px solid !important;
}
}
/***********************************************************
Form View : Handle Button Borders
************************************************************/
.btn-secondary,
.btn-light {
border-color: $button-border-color;
}
.btn-light {
&:hover {
border-color: $button-border-color;
}
}
/***********************************************************
Form View : Handle Background for required fields
************************************************************/
.o_required_modifier:not(.o_readonly_modifier) {
.o_input {
/* Add background for all editable and required fields */
background-color: $input-background-color-required !important;
/* darker placeholder as the background is darker */
&::placeholder {
color: $input-color-placeholder-required;
}
}
}
.o_required_modifier.o_field_selection:not(.o_readonly_modifier) {
/* Specific case for field selection */
background-color: $input-background-color-required !important;
}
/***********************************************************
Search View : Search Bar Input
************************************************************/
div.o_searchview[role="search"] {
/* Add border for the searchable zone */
border: 1px solid $input-border-color !important;
border-radius: 3px;
/* add darker border when input inside has focus */
&:focus-within {
border-color: $input-border-color-focus !important;
}
}
/* Adjust padding to avoid items to be sticked to borders */
div.o_searchview_facet[role="img"] {
padding-left: 2px;
}
i.o_searchview_icon[role="img"] {
padding-right: 2px;
}
/***********************************************************
Tree View : Handle style for required fields
************************************************************/
.o_list_renderer
.o_data_row.o_selected_row
> .o_data_cell.o_required_modifier:not(.o_readonly_modifier) {
/* Disable border bottom as the field has now a background */
border-bottom: 0px solid;
}
| OCA/web/web_theme_classic/static/src/scss/web_theme_classic.scss/0 | {
"file_path": "OCA/web/web_theme_classic/static/src/scss/web_theme_classic.scss",
"repo_id": "OCA",
"token_count": 955
} | 95 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_timeline
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-07-08 05:19+0000\n"
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.10\n"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/js/timeline_renderer.js:0
#, python-format
msgid "<b>UNASSIGNED</b>"
msgstr "<b>未分配</b>"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/js/timeline_controller.esm.js:0
#, python-format
msgid "Are you sure you want to delete this record?"
msgstr "您确定要删除此记录吗?"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/xml/web_timeline.xml:0
#, python-format
msgid "Day"
msgstr "天"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/xml/web_timeline.xml:0
#, python-format
msgid "Month"
msgstr "月"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/js/timeline_renderer.js:0
#, python-format
msgid "Template \"timeline-item\" not present in timeline view definition."
msgstr "时间线视图定义中不存在模板“timeline-item”。"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/js/timeline_view.js:0
#: model:ir.model.fields.selection,name:web_timeline.selection__ir_ui_view__type__timeline
#, python-format
msgid "Timeline"
msgstr "时间线"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/js/timeline_renderer.js:0
#, python-format
msgid "Timeline view has not defined 'date_start' attribute."
msgstr "时间线视图尚未定义\"date_start\"属性。"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/xml/web_timeline.xml:0
#, python-format
msgid "Today"
msgstr "今天"
#. module: web_timeline
#: model:ir.model,name:web_timeline.model_ir_ui_view
msgid "View"
msgstr "视图"
#. module: web_timeline
#: model:ir.model.fields,field_description:web_timeline.field_ir_ui_view__type
msgid "View Type"
msgstr "查看类型"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/js/timeline_controller.esm.js:0
#, python-format
msgid "Warning"
msgstr "警告"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/xml/web_timeline.xml:0
#, python-format
msgid "Week"
msgstr "周"
#. module: web_timeline
#. odoo-javascript
#: code:addons/web_timeline/static/src/xml/web_timeline.xml:0
#, python-format
msgid "Year"
msgstr "年"
#~ msgid "Activity"
#~ msgstr "活动"
#~ msgid "Calendar"
#~ msgstr "日历"
#~ msgid "Diagram"
#~ msgstr "图表"
#~ msgid "Form"
#~ msgstr "表单"
#~ msgid "Gantt"
#~ msgstr "甘特图"
#~ msgid "Graph"
#~ msgstr "图形"
#~ msgid "Kanban"
#~ msgstr "看板"
#~ msgid "Pivot"
#~ msgstr "透视表"
#~ msgid "QWeb"
#~ msgstr "QWeb"
#~ msgid "Search"
#~ msgstr "搜索"
#~ msgid "Tree"
#~ msgstr "树形"
| OCA/web/web_timeline/i18n/zh_CN.po/0 | {
"file_path": "OCA/web/web_timeline/i18n/zh_CN.po",
"repo_id": "OCA",
"token_count": 1433
} | 96 |
/* global py */
/* Odoo web_timeline
* Copyright 2015 ACSONE SA/NV
* Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Copyright 2023 Onestein - Anjeel Haria
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
odoo.define("web_timeline.TimelineView", function (require) {
"use strict";
const core = require("web.core");
const utils = require("web.utils");
const view_registry = require("web.view_registry");
const AbstractView = require("web.AbstractView");
const TimelineRenderer = require("web_timeline.TimelineRenderer");
const TimelineController = require("web_timeline.TimelineController");
const TimelineModel = require("web_timeline.TimelineModel");
const _lt = core._lt;
function isNullOrUndef(value) {
return _.isUndefined(value) || _.isNull(value);
}
var TimelineView = AbstractView.extend({
display_name: _lt("Timeline"),
icon: "fa fa-tasks",
jsLibs: ["/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.js"],
cssLibs: ["/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.css"],
config: _.extend({}, AbstractView.prototype.config, {
Model: TimelineModel,
Controller: TimelineController,
Renderer: TimelineRenderer,
}),
viewType: "timeline",
/**
* @override
*/
init: function (viewInfo, params) {
this._super.apply(this, arguments);
this.modelName = this.controllerParams.modelName;
const action = params.action;
this.arch = this.rendererParams.arch;
const attrs = this.arch.attrs;
const date_start = attrs.date_start;
const date_stop = attrs.date_stop;
const date_delay = attrs.date_delay;
const dependency_arrow = attrs.dependency_arrow;
const fields = viewInfo.fields;
let fieldNames = fields.display_name ? ["display_name"] : [];
const fieldsToGather = [
"date_start",
"date_stop",
"default_group_by",
"progress",
"date_delay",
attrs.default_group_by,
];
for (const field of fieldsToGather) {
if (attrs[field]) {
fieldNames.push(attrs[field]);
}
}
const archFieldNames = _.map(
_.filter(this.arch.children, (item) => item.tag === "field"),
(item) => item.attrs.name
);
fieldNames = _.union(fieldNames, archFieldNames);
const colors = this.parse_colors();
for (const color of colors) {
if (!fieldNames.includes(color.field)) {
fieldNames.push(color.field);
}
}
if (dependency_arrow) {
fieldNames.push(dependency_arrow);
}
const mode = attrs.mode || attrs.default_window || "fit";
const min_height = attrs.min_height || 300;
const current_window = {
start: new moment(),
end: new moment().add(24, "hours"),
};
if (!isNullOrUndef(attrs.quick_create_instance)) {
this.quick_create_instance = "instance." + attrs.quick_create_instance;
}
let open_popup_action = false;
if (
!isNullOrUndef(attrs.event_open_popup) &&
utils.toBoolElse(attrs.event_open_popup, true)
) {
open_popup_action = attrs.event_open_popup;
}
this.rendererParams.mode = mode;
this.rendererParams.model = this.modelName;
this.rendererParams.view = this;
this.rendererParams.options = this._preapre_vis_timeline_options(attrs);
this.rendererParams.current_window = current_window;
this.rendererParams.date_start = date_start;
this.rendererParams.date_stop = date_stop;
this.rendererParams.date_delay = date_delay;
this.rendererParams.colors = colors;
this.rendererParams.fieldNames = fieldNames;
this.rendererParams.default_group_by = attrs.default_group_by;
this.rendererParams.min_height = min_height;
this.rendererParams.dependency_arrow = dependency_arrow;
this.rendererParams.fields = fields;
this.loadParams.modelName = this.modelName;
this.loadParams.fieldNames = fieldNames;
this.loadParams.default_group_by = attrs.default_group_by;
this.controllerParams.open_popup_action = open_popup_action;
this.controllerParams.date_start = date_start;
this.controllerParams.date_stop = date_stop;
this.controllerParams.date_delay = date_delay;
this.controllerParams.actionContext = action.context;
this.withSearchPanel = false;
},
_preapre_vis_timeline_options: function (attrs) {
return {
groupOrder: "order",
orientation: "both",
selectable: true,
multiselect: true,
showCurrentTime: true,
stack: isNullOrUndef(attrs.stack)
? true
: utils.toBoolElse(attrs.stack, true),
margin: attrs.margin ? JSON.parse(attrs.margin) : {item: 2},
zoomKey: attrs.zoomKey || "ctrlKey",
};
},
/**
* Parse the colors attribute.
*
* @private
* @returns {Array}
*/
parse_colors: function () {
if (this.arch.attrs.colors) {
return _(this.arch.attrs.colors.split(";"))
.chain()
.compact()
.map((color_pair) => {
const pair = color_pair.split(":");
const color = pair[0];
const expr = pair[1];
const temp = py.parse(py.tokenize(expr));
return {
color: color,
field: temp.expressions[0].value,
opt: temp.operators[0],
value: temp.expressions[1].value,
};
})
.value();
}
return [];
},
});
view_registry.add("timeline", TimelineView);
return TimelineView;
});
| OCA/web/web_timeline/static/src/js/timeline_view.js/0 | {
"file_path": "OCA/web/web_timeline/static/src/js/timeline_view.js",
"repo_id": "OCA",
"token_count": 3417
} | 97 |
/** @odoo-module **/
/* Copyright 2023 Moduon Team S.L.
* License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) */
import {FormController} from "@web/views/form/form_controller";
import {patch} from "@web/core/utils/patch";
import {hasTouch} from "@web/core/browser/feature_detection";
patch(FormController.prototype, "web_touchscreen.FormController", {
setup() {
const wasSmall = this.env.isSmall;
// Create a new env that extends the original one but overrides the way
// Odoo considers this device small: it will be small if it has touch
// capabilities, not only if the screen is small. In practice, this
// will make the inline subforms prefer the kanban mode if possible.
const newEnv = {isSmall: wasSmall || hasTouch()};
Object.setPrototypeOf(newEnv, this.env);
this.env = newEnv;
return this._super(...arguments);
},
});
| OCA/web/web_touchscreen/static/src/form_controller.esm.js/0 | {
"file_path": "OCA/web/web_touchscreen/static/src/form_controller.esm.js",
"repo_id": "OCA",
"token_count": 332
} | 98 |
To use this module, you need to:
#. Go to any tree view
#. select some records
#. open the sidebar menu and click 'Duplicate'
Note that even when selecting all records via the top checkbox on a list, this will only duplicate the currently visible items. If you really need to duplicate all records, you need to adjust the list view limit accordingly.
.. image:: /web_tree_duplicate/static/description/screenshot-duplicate.png
| OCA/web/web_tree_duplicate/readme/USAGE.rst/0 | {
"file_path": "OCA/web/web_tree_duplicate/readme/USAGE.rst",
"repo_id": "OCA",
"token_count": 111
} | 99 |
#. On 17, we could remove the char field and only use the Json Field
| OCA/web/web_widget_bokeh_chart/readme/ROADMAP.rst/0 | {
"file_path": "OCA/web/web_widget_bokeh_chart/readme/ROADMAP.rst",
"repo_id": "OCA",
"token_count": 19
} | 100 |
# Copyright 2021 Quentin DUPONT
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Web Widget DatePicker Full Options",
"version": "16.0.1.0.0",
"author": "GRAP, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Web",
"website": "https://github.com/OCA/web",
"installable": True,
"depends": [
"web",
],
"assets": {
"web.assets_backend": [
"web_widget_datepicker_fulloptions/static/src/js/"
"web_widget_datepicker_fulloptions.esm.js"
],
},
}
| OCA/web/web_widget_datepicker_fulloptions/__manifest__.py/0 | {
"file_path": "OCA/web/web_widget_datepicker_fulloptions/__manifest__.py",
"repo_id": "OCA",
"token_count": 269
} | 101 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_domain_editor_dialog
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-09-01 17:23+0000\n"
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"
#. module: web_widget_domain_editor_dialog
#. openerp-web
#: code:addons/web_widget_domain_editor_dialog/static/src/js/basic_fields.js:0
#, python-format
msgid "Select records..."
msgstr "选择记录..."
#. module: web_widget_domain_editor_dialog
#. openerp-web
#: code:addons/web_widget_domain_editor_dialog/static/src/js/widget_domain_editor_dialog.js:0
#, python-format
msgid "Selected domain"
msgstr "选定的域"
#~ msgid "Custom Filter"
#~ msgstr "定制筛选器"
| OCA/web/web_widget_domain_editor_dialog/i18n/zh_CN.po/0 | {
"file_path": "OCA/web/web_widget_domain_editor_dialog/i18n/zh_CN.po",
"repo_id": "OCA",
"token_count": 426
} | 102 |
* `CorporateHub <https://corporatehub.eu/>`__
* Alexey Pelykh <alexey.pelykh@corphub.eu>
* `Therp BV <https://therp.nl/>`__
* Ronald Portier <ronald@therp.nl>
* Thanakrit Pintana <thanakrit.p39@gmail.com>
* `Trobz <https://trobz.com>`_:
* Son Ho <sonho@trobz.com>
| OCA/web/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.rst/0 | {
"file_path": "OCA/web/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.rst",
"repo_id": "OCA",
"token_count": 129
} | 103 |
# Copyright 2019 Siddharth Bhalgami <siddharth.bhalgami@gmail.com>
# Copyright 2019-Today: Druidoo (<https://www.druidoo.io>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import api, models
class IrConfigParameter(models.Model):
_inherit = "ir.config_parameter"
@api.model
def get_webcam_flash_fallback_mode_config(self):
return self.sudo().get_param(
"web_widget_image_webcam.flash_fallback_mode", default=False
)
| OCA/web/web_widget_image_webcam/models/ir_config_parameter.py/0 | {
"file_path": "OCA/web/web_widget_image_webcam/models/ir_config_parameter.py",
"repo_id": "OCA",
"token_count": 196
} | 104 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_mpld3_chart
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-04 15:34+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: web_widget_mpld3_chart
#: model:ir.model,name:web_widget_mpld3_chart.model_abstract_mpld3_parser
msgid "Utility to parse ploot figure to json data for widget Mpld3"
msgstr ""
"Utility per analizzare immagine disegnata in dati JSON per il widget MPLD3"
| OCA/web/web_widget_mpld3_chart/i18n/it.po/0 | {
"file_path": "OCA/web/web_widget_mpld3_chart/i18n/it.po",
"repo_id": "OCA",
"token_count": 323
} | 105 |
// Copyright 2023 Moduon Team S.L.
// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
.widget_numeric_step {
// Hide the buttons until the user hovers if possible
@media (hover: hover) {
.btn_numeric_step {
visibility: hidden;
}
}
&:hover .btn_numeric_step {
visibility: visible;
}
}
.o_numeric_step_cell {
// Default for old browsers
min-width: 15 * $btn-padding-x;
// Value hardcoded in `FIXED_FIELD_COLUMN_WIDTHS.float` + width of 2
// FontAwesome icons + 2 buttons * 2 horizontal paddings
min-width: calc(92px + 2ex + 4 * #{$btn-padding-x});
}
| OCA/web/web_widget_numeric_step/static/src/numeric_step.scss/0 | {
"file_path": "OCA/web/web_widget_numeric_step/static/src/numeric_step.scss",
"repo_id": "OCA",
"token_count": 271
} | 106 |
* Enric Tobella <etobella@creublanca.es>
* Raf Ven <raf.ven@dynapps.be>
* Dhara Solanki <dhara.solanki@initos.com>
* `Quartile <https://www.quartile.co>`__:
* Aung Ko Ko Lin
| OCA/web/web_widget_open_tab/readme/CONTRIBUTORS.rst/0 | {
"file_path": "OCA/web/web_widget_open_tab/readme/CONTRIBUTORS.rst",
"repo_id": "OCA",
"token_count": 80
} | 107 |
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_x2many_2d_matrix
#
# Translators:
# SaFi J. <safi2266@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: web (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-16 07:41+0000\n"
"PO-Revision-Date: 2015-12-16 17:24+0000\n"
"Last-Translator: SaFi J. <safi2266@gmail.com>\n"
"Language-Team: Arabic (http://www.transifex.com/oca/OCA-web-8-0/language/"
"ar/)\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#. module: web_widget_x2many_2d_matrix
#. odoo-javascript
#: code:addons/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.xml:0
#, python-format
msgid "Nothing to display."
msgstr ""
#, fuzzy, python-format
#~ msgid "Sum Total"
#~ msgstr "المجموع الاجمالي"
| OCA/web/web_widget_x2many_2d_matrix/i18n/ar.po/0 | {
"file_path": "OCA/web/web_widget_x2many_2d_matrix/i18n/ar.po",
"repo_id": "OCA",
"token_count": 473
} | 108 |
This module allows to show an x2many field with 3-tuples
($x_value, $y_value, $value) in a table
+-----------+-------------+-------------+
| | $x_value1 | $x_value2 |
+===========+=============+=============+
| $y_value1 | $value(1/1) | $value(2/1) |
+-----------+-------------+-------------+
| $y_value2 | $value(1/2) | $value(2/2) |
+-----------+-------------+-------------+
where `value(n/n)` is editable.
An example use case would be: Select some projects and some employees so that
a manager can easily fill in the planned_hours for one task per employee. The
result could look like this:
.. image:: https://raw.githubusercontent.com/OCA/web/12.0/web_widget_x2many_2d_matrix/static/description/screenshot.png
:alt: Screenshot
The beauty of this is that you have an arbitrary amount of columns with this
widget, trying to get this in standard x2many lists involves some quite ugly
hacks.
| OCA/web/web_widget_x2many_2d_matrix/readme/DESCRIPTION.rst/0 | {
"file_path": "OCA/web/web_widget_x2many_2d_matrix/readme/DESCRIPTION.rst",
"repo_id": "OCA",
"token_count": 295
} | 109 |
@import "vars";
#lean_overlay {
position: fixed;
z-index: 100;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
background: black;
display: none;
}
.modal {
display: none;
&>a.close {
position: absolute;
top: 0px;
right: 10px;
font-size: 20px;
font-weight: bold;
color: rgba(black, 0.5);
text-decoration: none;
&:hover { color: black; }
}
&>.modal-body {
background-color: $gray5;
border-bottom-left-radius: $radius-size;
border-bottom-right-radius: $radius-size;
padding: 10px 50px;
.accordion {
.accordion-pair>h5 { background-color: $gray4; }
}
}
h1 {
background-color: white;
padding: 40px 35px 20px 35px;
margin: 0;
}
p { margin: 5px 10px 15px 10px; }
}
| SquareSquash/web/app/assets/stylesheets/_modal.scss/0 | {
"file_path": "SquareSquash/web/app/assets/stylesheets/_modal.scss",
"repo_id": "SquareSquash",
"token_count": 345
} | 110 |
@import "vars";
body#users-show {
h1 img {
height: $h1-size;
vertical-align: bottom;
margin-right: 10px;
}
}
| SquareSquash/web/app/assets/stylesheets/users.css.scss/0 | {
"file_path": "SquareSquash/web/app/assets/stylesheets/users.css.scss",
"repo_id": "SquareSquash",
"token_count": 60
} | 111 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Controller that works with a {Project}'s {Environment Environments}.
#
# Common
# ======
#
# Path Parameters
# ---------------
#
# | | |
# |:-------------|:--------------------|
# | `project_id` | The Project's slug. |
class EnvironmentsController < ApplicationController
before_filter :find_project
before_filter :find_environment, only: :update
before_filter :admin_login_required, only: :update
respond_to :json
# Edits an Environment. Only the Project owner or an admin can modify an
# Environment.
#
# Routes
# ------
#
# * `PATCH /projects/:project_id/environments/:id.json`
#
# Path Parameters
# ---------------
#
# | | |
# |:-----|:------------------------|
# | `id` | The Environment's name. |
#
# Body Parameters
# ---------------
#
# The body can be JSON- or form URL-encoded.
#
# | | |
# |:--------------|:------------------------------------------|
# | `environment` | Parameterized hash of Environment fields. |
def update
@environment.update_attributes environment_params
respond_with @environment, location: project_url(@project)
end
private
def find_environment
@environment = @project.environments.find_by_name!(params[:id])
end
def environment_params
params.require(:environment).permit(:sends_emails, :notifies_pagerduty)
end
end
| SquareSquash/web/app/controllers/environments_controller.rb/0 | {
"file_path": "SquareSquash/web/app/controllers/environments_controller.rb",
"repo_id": "SquareSquash",
"token_count": 710
} | 112 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'zlib'
require 'base64'
# Obfuscation information for a Java project. This model stores a representation
# of a Java project's namespace, along with the obfuscated aliases to the
# classes, packages, and methods of that namespace. See the Squash Java
# Deobfuscation library documentation for more information.
#
# ### Namespace Data
#
# Namespace and name mapping data is generated using the "squash_java" gem. The
# gem produces a memory representation of the project namespace. The gem is also
# included in this project to support deserializing the resulting data.
#
# Serialization is accomplished by YAML-serializing the `Namespace` object,
# zlib-encoding the result, and then base-64-encoding the compressed output.
# This is also how the `namespace` property is transmitted over the wire.
#
# No support is given for modifying these objects after they have been
# deserialized from YAML.
#
# Associations
# ------------
#
# | | |
# |:---------|:-----------------------------------------|
# | `deploy` | The {Deploy} using this obfuscation map. |
#
# Properties
# ----------
#
# | | |
# |:------------|:---------------------------------------------------------------------|
# | `namespace` | A serialized `Squash::Java::Namespace` object with obfuscation data. |
class ObfuscationMap < ActiveRecord::Base
belongs_to :deploy, inverse_of: :obfuscation_map
validates :deploy,
presence: true
after_commit(on: :create) do |map|
BackgroundRunner.run ObfuscationMapWorker, map.id
end
attr_readonly :namespace
# @private
def namespace
@namespace ||= begin
ns = YAML.load(Zlib::Inflate.inflate(Base64.decode64(read_attribute(:namespace))))
raise TypeError, "expected Squash::Java::Namespace, got #{ns.class}" unless ns.kind_of?(Squash::Java::Namespace)
ns
end
end
# @private
def namespace=(ns)
raise TypeError, "expected Squash::Java::Namespace, got #{ns.class}" unless ns.kind_of?(Squash::Java::Namespace)
write_attribute :namespace, Base64.encode64(Zlib::Deflate.deflate(ns.to_yaml))
end
end
| SquareSquash/web/app/models/obfuscation_map.rb/0 | {
"file_path": "SquareSquash/web/app/models/obfuscation_map.rb",
"repo_id": "SquareSquash",
"token_count": 941
} | 113 |
// Copyright 2014 Square Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
$(document).ready(function() {
new DynamicSearchField($('#project-filter'), processProjectSearchResults);
new EmailAliasForm($('#email-aliases'),
"<%= account_emails_url format: 'json' %>",
"<%= account_emails_url format: 'json' %>");
// pre-populate with most recent projects
processProjectSearchResults('');
});
function processProjectSearchResults(query) {
$.ajax('<%= account_memberships_url(format: 'json') %>?query=' + encodeURIComponent(query), {
type: 'GET',
success: function(results) {
var resultList = $('#project-results');
resultList.find('li').remove();
$.each(results, function(_, membership) {
var li = $('<li/>').appendTo(resultList);
$('<h5/>').append($('<a/>').text(membership.project.name).attr('href', membership.project.url)).appendTo(li);
var p = $('<p/>').text(' — ' + (membership.role == 'owner' ? 'created' : 'joined') + ' ' + membership.created_string).appendTo(li);
if (membership.role == 'owner')
$('<button/>').attr({href: membership.project.url + '?show_environments=true#change_owner', type: 'button'}).
text("Change Ownership").autoButton().prependTo(li);
else
$('<button/>').attr({ 'data-sqmethod': 'DELETE', href: membership.delete_url }).
addClass('warning').text("Leave Project").autoButton().prependTo(li);
$('<strong/>').text(membership.human_role).prependTo(p);
});
},
error: function() { new Flash('alert').text("Error retrieving search results."); }
});
}
| SquareSquash/web/app/views/accounts/show.js.erb/0 | {
"file_path": "SquareSquash/web/app/views/accounts/show.js.erb",
"repo_id": "SquareSquash",
"token_count": 813
} | 114 |
There has been a new occurrence of this bug.
Bug: <%= project_environment_bug_url @bug.environment.project, @bug.environment, @bug %>
Occurrence: <%= project_environment_bug_occurrence_url @bug.environment.project, @bug.environment, @bug, @occurrence %>
THE BUG
<%= @bug.class_name %>
<% if @bug.special_file? %>
in <%= @bug.file %>
<% else %>
in <%= @bug.file %>:<%= @bug.line %>
<% end %>
THE OCCURRENCE
<%= @occurrence.message %>
<% if @occurrence.web? %>
<% if @occurrence.url %>
Request: <%= @occurrence.request_method %> <%= @occurrence.url.to_s %>
<% else %>
Request: <%= @occurrence.request_method %> (invalid URL)
<% end %>
<% end %>
<% if @occurrence.rails? %>
Controller: <%= @occurrence.controller %>
Action: <%= @occurrence.action %>
<% end %>
<% if @occurrence.server? %>
Hostname: <%= @occurrence.hostname %>
PID: <%= @occurrence.pid %>
<% end %>
<% if @occurrence.client? %>
Build: <%= @occurrence.build %>
Device: <%= @occurrence.device_type %>
OS: <%= @occurrence.operating_system %>
<% end %>
<% if @occurrence.mobile? %>
Network Operator: <%= @occurrence.network_operator %>
Network Type: <%= @occurrence.network_type %>
<% end %>
<% if @occurrence.browser? %>
Web Browser: <%= @occurrence.browser_name %> (<%= @occurrence.browser_version %>)
<% end %>
Stack trace:
<%= render_backtrace(@occurrence.faulted_backtrace).indent(2) %>
Yours truly,
Squash
---
If you wish to stop receiving these emails, visit the bug page:
<%= project_environment_bug_url @bug.environment.project, @bug.environment, @bug, anchor: 'notifications' %>
| SquareSquash/web/app/views/notification_mailer/occurrence.text.erb/0 | {
"file_path": "SquareSquash/web/app/views/notification_mailer/occurrence.text.erb",
"repo_id": "SquareSquash",
"token_count": 628
} | 115 |
# encoding: utf-8
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require Rails.root.join('app', 'views', 'layouts', 'application.html.rb')
module Views
# @private
module Users
# @private
class Show < Views::Layouts::Application
needs :user
protected
def page_title() @user.name end
def body_content
full_width_section do
h1 do
image_tag @user.gravatar
text @user.name
end
user_info
end
end
private
def user_info
dl do
dt "Username"
dd @user.username
dt "Joined"
dd l(@user.created_at, format: :short_date)
dt "Projects"
dd @user.memberships.count
dt "Projects Owned"
dd @user.owned_projects.count
end
end
end
end
end
| SquareSquash/web/app/views/users/show.html.rb/0 | {
"file_path": "SquareSquash/web/app/views/users/show.html.rb",
"repo_id": "SquareSquash",
"token_count": 588
} | 116 |
---
from: squash@YOUR_DOMAIN
domain: YOUR_DOMAIN
strategy: sendmail
smtp_settings:
address:
port:
domain:
user_name:
password:
authentication:
enable_starttls_auto:
| SquareSquash/web/config/environments/common/mailer.yml/0 | {
"file_path": "SquareSquash/web/config/environments/common/mailer.yml",
"repo_id": "SquareSquash",
"token_count": 67
} | 117 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Reopen the Active Record base class to add a few very non-intrusive changes.
# Yes, mixins are the correct way of doing this, but this is a really small
# change and it's much more convenient this way. Also includes fixes for
# composite primary keys.
class ActiveRecord::Base
# Before-hook that sets string fields to nil if they're empty.
def self.set_nil_if_blank(*fields)
fields.each do |field|
before_validation { |obj| obj.send :"#{field}=", nil if obj.send(field).blank? }
end
end
# Apparently CPK forgot to override this method
def touch(name = nil)
attributes = timestamp_attributes_for_update_in_model
attributes << name if name
unless attributes.empty?
current_time = current_time_from_proper_timezone
changes = {}
attributes.each do |column|
changes[column.to_s] = write_attribute(column.to_s, current_time)
end
changes[self.class.locking_column] = increment_lock if locking_enabled?
@changed_attributes.except!(*changes.keys)
primary_key = self.class.primary_key
#CPK
#self.class.unscoped.update_all(changes, {primary_key => self[primary_key]}) == 1
where_clause = Array.wrap(self.class.primary_key).inject({}) { |hsh, key| hsh[key] = self[key]; hsh }
self.class.unscoped.where(where_clause).update_all(changes) == 1
end
end
# Edge rails renames this field so that models can have a column named "field"
# without it conflicting with the magic dirty methods. Composite Primary Keys
# has not been updated in turn, so until it is, we'll revert to the old
# behavior and just not have any attributes named "field".
alias field_changed? _field_changed?
end
class ActiveRecord::Associations::HasManyAssociation
# holy shit Rails, really? No way to disable this behavior?
def has_cached_counter?(*args) false end
end
class ActiveRecord::Relation
# Returns the first record if count is 1, nil otherwise.
def only() count == 1 ? first : nil end
# In the event that we're not using cursors, define #cursor to proxy to
# #find_each.
def cursor
CursorProxy.new(self)
end
# @private
class CursorProxy
delegate :each, to: :relation
attr_reader :relation
def initialize(relation)
@relation = relation
end
end
end
| SquareSquash/web/config/initializers/active_record.rb/0 | {
"file_path": "SquareSquash/web/config/initializers/active_record.rb",
"repo_id": "SquareSquash",
"token_count": 942
} | 118 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
module API
# Raised when invalid attributes are provided to the worker.
class InvalidAttributesError < StandardError; end
# Raised when an unknown API key is provided.
class UnknownAPIKeyError < StandardError; end
end
| SquareSquash/web/lib/api/errors.rb/0 | {
"file_path": "SquareSquash/web/lib/api/errors.rb",
"repo_id": "SquareSquash",
"token_count": 232
} | 119 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
liveUpdates = []
# Applies live-updating behavior to a page element. This function acts in one of
# two ways depending on the type of tag it's called on:
#
# TIME tags:
#
# Given a time tag like <time datetime="[JSON-formatted time string]" />, sets
# the content of the tag to the relative representation of that time (e.g.,
# "about 5 hours ago"), and adds an on-hover tooltip displaying the absolute
# time. Spawns a timer that periodically updates the relative time.
#
# Constructor takes no parameters.
#
# Other tags:
#
# Takes an Ajax-y endpoint and a handler. Periodically calls the endpoint and
# then invokes the handler with the result. The endpoint should return new data
# to update the element value, and the handler should take that data and update
# the element content appropriately.
#
# The element will be temporarily highlighted if it is detected that the value
# changed.
#
# @param [String] endpoint The URL to the form updating endpoint.
# @param [function] handler Invoked with the response of the endpoint when the
# field is to be updated.
# @param [Object] options Additional options:
# @option options [Boolean] showWhenLoading (true) Display an ellipsis when the
# value is loading.
# @option options [Boolean] showWhenError (true) Display an error icon on Ajax
# error.
#
jQuery.fn.liveUpdate = (endpoint, handler, options) ->
return unless this[0]
element = $(this[0])
updater = null
options = $.extend({}, options, { showWhenLoading: true, showWhenError: true })
if this[0].nodeName.toLowerCase() == 'time'
time = new Date(Date.parse(element.attr('datetime')))
element.attr('title', time.toLocaleString()).tooltip()
updater = ->
time = new Date(Date.parse(element.attr('datetime')))
element.text "#{timeAgoInWords(time)} ago"
else
if options.showWhenLoading then element.text("…")
updater = ->
$.ajax endpoint,
type: 'GET'
success: (response) =>
old_body = element.html()
element.empty()
element.text handler(response)
if old_body != "…" && element.html() != old_body
element.effect('highlight')
error: =>
element.empty()
if options.showWhenError then $('<i/>').addClass('fa fa-exclamation-circle').appendTo element
liveUpdates.push updater
$(document).stopTime 'liveUpdate'
$(document).everyTime 10000, 'liveUpdate', -> (proc() for proc in liveUpdates)
updater()
return element
| SquareSquash/web/lib/assets/javascripts/live_update.js.coffee/0 | {
"file_path": "SquareSquash/web/lib/assets/javascripts/live_update.js.coffee",
"repo_id": "SquareSquash",
"token_count": 972
} | 120 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
module BackgroundRunner
# `BackgroundRunner` adapter for the Resque job system. See the
# `concurrency.yml` Configoro file for configuration options.
module Resque
def self.setup
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'
common_file = File.join(rails_root.to_s, 'config', 'environments', 'common', 'concurrency.yml')
env_file = File.join(rails_root.to_s, 'config', 'environments', rails_env, 'concurrency.yml')
config = YAML.load_file(common_file)
if File.exist?(env_file)
config.merge! YAML.load_file(env_file)
end
::Resque.redis = config['resque'][rails_env]
::Resque.inline = true if rails_env == 'test'
end
def self.run(job_name, *arguments)
job_name = job_name.constantize unless job_name.kind_of?(Class)
::Resque.enqueue job_name.const_get(:ResqueAdapter), *arguments
end
def self.extend_job(mod)
resque_adapter = Class.new
resque_adapter.instance_variable_set :@queue, Squash::Configuration.concurrency.resque.queue[mod.to_s]
resque_adapter.singleton_class.send(:define_method, :perform) do |*args|
mod.perform *args
end
mod.const_set :ResqueAdapter, resque_adapter
end
end
end
if Squash::Configuration.concurrency.background_runner == 'Resque'
# If we're loading resque-web using this file, we'll need to run setup manually
#
# resque-web lib/background_runner/resque.rb
if !ARGV.empty? && File.expand_path(ARGV.first, Dir.getwd) == File.expand_path(__FILE__, Dir.getwd)
BackgroundRunner::Resque.setup
end
end
| SquareSquash/web/lib/background_runner/resque.rb/0 | {
"file_path": "SquareSquash/web/lib/background_runner/resque.rb",
"repo_id": "SquareSquash",
"token_count": 842
} | 121 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Authorization constraint, used by the Sidekiq routes, that ensures that there
# exists a current user session.
module SidekiqAuthConstraint
# The default `authorized?` implementation if there is no refined
# implementation provided by the authentication strategy.
module Default
# Determines whether a user can access the Sidekiq admin page.
#
# @param [ActionDispatch::Request] request A request.
# @return [true, false] Whether the user can access the Sidekiq admin page.
def authorized?(request)
return false unless request.session[:user_id]
user = User.find(request.session[:user_id])
!user.nil?
end
end
# first incorporate the default behavior
extend Default
# then, if available, incorporate the auth-specific behavior
begin
auth_module = "sidekiq_auth_constraint/#{Squash::Configuration.authentication.strategy}".camelize.constantize
extend auth_module
rescue NameError
# no auth module; ignore
end
end
| SquareSquash/web/lib/sidekiq_auth_constraint.rb/0 | {
"file_path": "SquareSquash/web/lib/sidekiq_auth_constraint.rb",
"repo_id": "SquareSquash",
"token_count": 476
} | 122 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Tells PagerDuty to acknowledge the incident associated with a Bug. This occurs
# when a Bug is marked as irrelevant or assigned to a User.
class PagerDutyAcknowledger
include BackgroundRunner::Job
# Creates a new instance and sends a PagerDuty acknowledgement.
#
# @param [Fixnum] bug_id The ID of a Bug.
def self.perform(bug_id)
new(Bug.find(bug_id)).perform
end
# Creates a new worker instance.
#
# @param [Bug] bug A Bug that was assigned.
def initialize(bug)
@bug = bug
end
# Sends a PagerDuty API call acknowledging an incident.
def perform
@bug.environment.project.pagerduty.acknowledge @bug.pagerduty_incident_key,
description,
details
end
private
def description
if @bug.fixed?
I18n.t 'workers.pagerduty.acknowledge.description.fixed',
class_name: @bug.class_name,
file_name: File.basename(@bug.file),
locale: @bug.environment.project.locale
elsif @bug.irrelevant?
I18n.t 'workers.pagerduty.acknowledge.description.irrelevant',
class_name: @bug.class_name,
file_name: File.basename(@bug.file),
locale: @bug.environment.project.locale
else
I18n.t 'workers.pagerduty.acknowledge.description.assigned',
class_name: @bug.class_name,
file_name: File.basename(@bug.file),
user: @bug.assigned_user.name,
locale: @bug.environment.project.locale
end
end
def details
{
'assigned_user' => @bug.assigned_user.try!(:name)
}
end
end
| SquareSquash/web/lib/workers/pager_duty_acknowledger.rb/0 | {
"file_path": "SquareSquash/web/lib/workers/pager_duty_acknowledger.rb",
"repo_id": "SquareSquash",
"token_count": 942
} | 123 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
unless defined?(Squash)
puts "You must run this script using `rails runner`."
exit 1
end
if Squash::Configuration.jira.disabled?
puts "JIRA integration is disabled. Set disabled: false in your environment's"
puts "jira.yml file."
exit 1
end
if Squash::Configuration.jira.authentication.strategy != 'oauth'
puts "JIRA integration is not using OAuth authentication. Set"
puts "authentication.strategy to 'oauth' in your environment's jira.yml file."
exit 1
end
if !Squash::Configuration.jira.authentication[:private_key_file] || !Squash::Configuration.jira.authentication[:consumer_key]
puts "You need to set the 'consumer_key' and 'private_key_file' keys in the"
puts "authentication section of your environment's jira.yml file. You generate"
puts "the consumer key and private key as part of creating an OAuth application"
puts "entry in your JIRA administration panel. You can have Squash generate"
puts "them for you by running `rake jira:generate_consumer_key` and"
puts "`jira:generate_public_cert`."
exit 1
end
client = Service::JIRA.client(timeout: 60,
open_timeout: 60,
read_timeout: 60)
request_token = client.request_token
puts "Visit the following URL in your browser: #{request_token.authorize_url}"
puts "Log in as the JIRA user you wish Squash to use, authorize Squash, and then"
puts "enter the verification code below."
puts
verification_code = nil
while verification_code.blank?
puts "Verification code:"
verification_code = gets.strip
end
access_token = client.init_access_token(oauth_verifier: verification_code)
puts "Place the following entries in your jira.yml file under the authentication"
puts "section:"
puts
puts "token: #{access_token.token}"
puts "secret: #{access_token.secret}"
| SquareSquash/web/script/jira_oauth.rb/0 | {
"file_path": "SquareSquash/web/script/jira_oauth.rb",
"repo_id": "SquareSquash",
"token_count": 800
} | 124 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'rails_helper'
RSpec.describe EnvironmentsController, type: :controller do
describe "#update" do
before(:each) { @environment = FactoryGirl.create(:environment, sends_emails: true) }
it "should require a logged-in user" do
patch :update, polymorphic_params(@environment, false, environment: {sends_emails: false}, format: 'json')
expect(response.status).to eql(401)
expect(@environment.reload.sends_emails?).to eql(true)
end
context '[authenticated]' do
before(:each) { login_as @environment.project.owner }
it "should allow admins to alter the environment" do
user = FactoryGirl.create(:membership, project: @environment.project, admin: true).user
login_as user
patch :update, polymorphic_params(@environment, false, environment: {sends_emails: false}, format: 'json')
expect(response.status).to eql(200)
expect(@environment.reload.sends_emails?).to eql(false)
end
it "should not allow members to alter the environment" do
login_as FactoryGirl.create(:membership, project: @environment.project, admin: false).user
patch :update, polymorphic_params(@environment, false, environment: {sends_emails: false}, format: 'json')
expect(response.status).to eql(403)
expect(@environment.reload.sends_emails?).to eql(true)
end
it "should allow owners to alter the environment" do
patch :update, polymorphic_params(@environment, false, environment: {sends_emails: false}, format: 'json')
expect(response.status).to eql(200)
expect(@environment.reload.sends_emails?).to eql(false)
expect(response.body).to eql(@environment.to_json)
end
it "should not allow protected fields to be set" do
expect { patch :update, polymorphic_params(@environment, false, environment: {bugs_count: 128}, format: 'json') }.not_to change(@environment, :bugs_count)
expect { @environment.reload }.not_to change(@environment, :bugs_count)
end
end
end
end
| SquareSquash/web/spec/controllers/environments_controller_spec.rb/0 | {
"file_path": "SquareSquash/web/spec/controllers/environments_controller_spec.rb",
"repo_id": "SquareSquash",
"token_count": 919
} | 125 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'rails_helper'
RSpec.describe Service::JIRA do
describe ".new_issue_link" do
it "should return a proper issue link" do
expect(Service::JIRA.new_issue_link(foo: 'bar')).
to eql(Squash::Configuration.jira.api_host +
Squash::Configuration.jira.api_root +
Squash::Configuration.jira.create_issue_details +
'?foo=bar'
)
end
end
describe ".issue" do
it "should locate a JIRA issue by key" do
FakeWeb.register_uri :get,
jira_url("/rest/api/2/issue/FOO-123"),
response: Rails.root.join('spec', 'fixtures', 'jira_issue.json')
issue = Service::JIRA.issue('FOO-123')
expect(issue.key).to eql('FOO-123')
expect(issue.summary).to eql("Double RTs on coffee bar Twitter monitor")
end
it "should return nil for an unknown issue" do
FakeWeb.register_uri :get,
jira_url("/rest/api/2/issue/FOO-124"),
response: Rails.root.join('spec', 'fixtures', 'jira_issue_404.json')
expect(Service::JIRA.issue('FOO-124')).to be_nil
end
end
describe ".statuses" do
it "should return all known issue statuses" do
FakeWeb.register_uri :get,
jira_url("/rest/api/2/status"),
response: Rails.root.join('spec', 'fixtures', 'jira_statuses.json')
statuses = Service::JIRA.statuses
expect(statuses.map(&:name)).
to eql(["Open", "In Progress", "Reopened", "Resolved", "Closed",
"Needs Review", "Approved", "Hold Pending Info", "IceBox",
"Not Yet Started", "Started", "Finished", "Delivered",
"Accepted", "Rejected", "Allocated", "Build", "Verify",
"Pending Review", "Stabilized", "Post Mortem Complete"])
end
end
describe ".projects" do
it "should return all known projects" do
FakeWeb.register_uri :get,
jira_url("/rest/api/2/project"),
response: Rails.root.join('spec', 'fixtures', 'jira_projects.json')
projects = Service::JIRA.projects
expect(projects.map(&:name)).
to eql(["Alert", "Android", "Bugs", "Business Intelligence",
"Checker", "Coffee Bar", "Compliance"])
end
end
end unless Squash::Configuration.jira.disabled?
| SquareSquash/web/spec/lib/service/jira_spec.rb/0 | {
"file_path": "SquareSquash/web/spec/lib/service/jira_spec.rb",
"repo_id": "SquareSquash",
"token_count": 1381
} | 126 |
# Copyright 2014 Square Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'rails_helper'
RSpec.describe ObfuscationMap, type: :model do
context "[hooks]" do
it "should deobfuscate pending occurrences when created" do
if RSpec.configuration.use_transactional_fixtures
pending "This is done in an after_commit hook, and it can't be tested with transactional fixtures (which are always rolled back)"
end
Project.delete_all
project = FactoryGirl.create(:project, repository_url: 'https://github.com/RISCfuture/better_caller.git')
env = FactoryGirl.create(:environment, project: project)
bug = FactoryGirl.create(:bug,
file: 'lib/better_caller/extensions.rb',
line: 5,
environment: env,
deploy: FactoryGirl.create(:deploy), environment: env,
blamed_revision: '30e7c2ff8758f4f19bfbc0a57e26c19ab69d1d44')
occurrence = FactoryGirl.create(:rails_occurrence,
revision: '2dc20c984283bede1f45863b8f3b4dd9b5b554cc',
bug: bug,
backtraces: [{"name" => "Thread 0",
"faulted" => true,
"backtrace" => [{"file" => "lib/better_caller/extensions.rb",
"line" => 5,
"symbol" => "foo"},
{"type" => "obfuscated",
"file" => "B.java",
"line" => 15,
"symbol" => "int b(int)",
"class_name" => "com.A.B"}]}])
expect(occurrence).not_to be_deobfuscated
namespace = Squash::Java::Namespace.new
namespace.add_package_alias 'com.foo', 'A'
namespace.add_class_alias('com.foo.Bar', 'B').path = 'src/foo/Bar.java'
namespace.add_method_alias 'com.foo.Bar', 'int foo(int)', 'b'
FactoryGirl.create :obfuscation_map, namespace: namespace, deploy: bug.deploy
expect(occurrence.reload).to be_deobfuscated
expect(occurrence.redirect_target_id).to be_nil
end
it "should reassign to another bug if blame changes" do
if RSpec.configuration.use_transactional_fixtures
pending "This is done in an after_commit hook, and it can't be tested with transactional fixtures (which are always rolled back)"
end
Project.delete_all
project = FactoryGirl.create(:project, repository_url: 'https://github.com/RISCfuture/better_caller.git')
env = FactoryGirl.create(:environment, project: project)
bug1 = FactoryGirl.create(:bug,
file: '_JAVA_',
line: 1,
blamed_revision: '30e7c2ff8758f4f19bfbc0a57e26c19ab69d1d44',
deploy: FactoryGirl.create(:deploy, environment: env),
environment: env)
bug2 = FactoryGirl.create(:bug,
file: 'lib/better_caller/extensions.rb',
line: 5,
blamed_revision: '30e7c2ff8758f4f19bfbc0a57e26c19ab69d1d44',
deploy: bug1.deploy,
environment: env)
occurrence = FactoryGirl.create(:rails_occurrence,
bug: bug1,
revision: bug1.blamed_revision,
backtraces: [{"name" => "Thread 0",
"faulted" => true,
"backtrace" => [{"type" => "obfuscated",
"file" => "B.java",
"line" => 5,
"symbol" => "int b(int)",
"class_name" => "com.A.B"}]}])
namespace = Squash::Java::Namespace.new
namespace.add_package_alias 'com.foo', 'A'
namespace.add_class_alias('com.foo.Bar', 'B').path = 'lib/better_caller/extensions.rb'
namespace.add_method_alias 'com.foo.Bar', 'int foo(int)', 'b'
FactoryGirl.create :obfuscation_map, namespace: namespace, deploy: bug1.deploy
expect(bug2.occurrences.count).to eql(1)
o2 = bug2.occurrences.first
expect(occurrence.reload.redirect_target_id).to eql(o2.id)
end
end
end
| SquareSquash/web/spec/models/obfuscation_map_spec.rb/0 | {
"file_path": "SquareSquash/web/spec/models/obfuscation_map_spec.rb",
"repo_id": "SquareSquash",
"token_count": 3327
} | 127 |
/* Flot plugin for selecting regions of a plot.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Licensed under the MIT license.
The plugin supports these options:
selection: {
mode: null or "x" or "y" or "xy",
color: color
}
Selection support is enabled by setting the mode to one of "x", "y" or "xy".
In "x" mode, the user will only be able to specify the x range, similarly for
"y" mode. For "xy", the selection becomes a rectangle where both ranges can be
specified. "color" is color of the selection (if you need to change the color
later on, you can get to it with plot.getOptions().selection.color).
When selection support is enabled, a "plotselected" event will be emitted on
the DOM element you passed into the plot function. The event handler gets a
parameter with the ranges selected on the axes, like this:
placeholder.bind( "plotselected", function( event, ranges ) {
alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to)
// similar for yaxis - with multiple axes, the extra ones are in
// x2axis, x3axis, ...
});
The "plotselected" event is only fired when the user has finished making the
selection. A "plotselecting" event is fired during the process with the same
parameters as the "plotselected" event, in case you want to know what's
happening while it's happening,
A "plotunselected" event with no arguments is emitted when the user clicks the
mouse to remove the selection.
The plugin allso adds the following methods to the plot object:
- setSelection( ranges, preventEvent )
Set the selection rectangle. The passed in ranges is on the same form as
returned in the "plotselected" event. If the selection mode is "x", you
should put in either an xaxis range, if the mode is "y" you need to put in
an yaxis range and both xaxis and yaxis if the selection mode is "xy", like
this:
setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });
setSelection will trigger the "plotselected" event when called. If you don't
want that to happen, e.g. if you're inside a "plotselected" handler, pass
true as the second parameter. If you are using multiple axes, you can
specify the ranges on any of those, e.g. as x2axis/x3axis/... instead of
xaxis, the plugin picks the first one it sees.
- clearSelection( preventEvent )
Clear the selection rectangle. Pass in true to avoid getting a
"plotunselected" event.
- getSelection()
Returns the current selection in the same format as the "plotselected"
event. If there's currently no selection, the function returns null.
*/
(function ($) {
function init(plot) {
var selection = {
first: { x: -1, y: -1}, second: { x: -1, y: -1},
show: false,
active: false
};
// FIXME: The drag handling implemented here should be
// abstracted out, there's some similar code from a library in
// the navigation plugin, this should be massaged a bit to fit
// the Flot cases here better and reused. Doing this would
// make this plugin much slimmer.
var savedhandlers = {};
var mouseUpHandler = null;
function onMouseMove(e) {
if (selection.active) {
updateSelection(e);
plot.getPlaceholder().trigger("plotselecting", [ getSelection() ]);
}
}
function onMouseDown(e) {
if (e.which != 1) // only accept left-click
return;
// cancel out any text selections
document.body.focus();
// prevent text selection and drag in old-school browsers
if (document.onselectstart !== undefined && savedhandlers.onselectstart == null) {
savedhandlers.onselectstart = document.onselectstart;
document.onselectstart = function () { return false; };
}
if (document.ondrag !== undefined && savedhandlers.ondrag == null) {
savedhandlers.ondrag = document.ondrag;
document.ondrag = function () { return false; };
}
setSelectionPos(selection.first, e);
selection.active = true;
// this is a bit silly, but we have to use a closure to be
// able to whack the same handler again
mouseUpHandler = function (e) { onMouseUp(e); };
$(document).one("mouseup", mouseUpHandler);
}
function onMouseUp(e) {
mouseUpHandler = null;
// revert drag stuff for old-school browsers
if (document.onselectstart !== undefined)
document.onselectstart = savedhandlers.onselectstart;
if (document.ondrag !== undefined)
document.ondrag = savedhandlers.ondrag;
// no more dragging
selection.active = false;
updateSelection(e);
if (selectionIsSane())
triggerSelectedEvent();
else {
// this counts as a clear
plot.getPlaceholder().trigger("plotunselected", [ ]);
plot.getPlaceholder().trigger("plotselecting", [ null ]);
}
return false;
}
function getSelection() {
if (!selectionIsSane())
return null;
if (!selection.show) return null;
var r = {}, c1 = selection.first, c2 = selection.second;
$.each(plot.getAxes(), function (name, axis) {
if (axis.used) {
var p1 = axis.c2p(c1[axis.direction]), p2 = axis.c2p(c2[axis.direction]);
r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) };
}
});
return r;
}
function triggerSelectedEvent() {
var r = getSelection();
plot.getPlaceholder().trigger("plotselected", [ r ]);
// backwards-compat stuff, to be removed in future
if (r.xaxis && r.yaxis)
plot.getPlaceholder().trigger("selected", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]);
}
function clamp(min, value, max) {
return value < min ? min: (value > max ? max: value);
}
function setSelectionPos(pos, e) {
var o = plot.getOptions();
var offset = plot.getPlaceholder().offset();
var plotOffset = plot.getPlotOffset();
pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width());
pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height());
if (o.selection.mode == "y")
pos.x = pos == selection.first ? 0 : plot.width();
if (o.selection.mode == "x")
pos.y = pos == selection.first ? 0 : plot.height();
}
function updateSelection(pos) {
if (pos.pageX == null)
return;
setSelectionPos(selection.second, pos);
if (selectionIsSane()) {
selection.show = true;
plot.triggerRedrawOverlay();
}
else
clearSelection(true);
}
function clearSelection(preventEvent) {
if (selection.show) {
selection.show = false;
plot.triggerRedrawOverlay();
if (!preventEvent)
plot.getPlaceholder().trigger("plotunselected", [ ]);
}
}
// function taken from markings support in Flot
function extractRange(ranges, coord) {
var axis, from, to, key, axes = plot.getAxes();
for (var k in axes) {
axis = axes[k];
if (axis.direction == coord) {
key = coord + axis.n + "axis";
if (!ranges[key] && axis.n == 1)
key = coord + "axis"; // support x1axis as xaxis
if (ranges[key]) {
from = ranges[key].from;
to = ranges[key].to;
break;
}
}
}
// backwards-compat stuff - to be removed in future
if (!ranges[key]) {
axis = coord == "x" ? plot.getXAxes()[0] : plot.getYAxes()[0];
from = ranges[coord + "1"];
to = ranges[coord + "2"];
}
// auto-reverse as an added bonus
if (from != null && to != null && from > to) {
var tmp = from;
from = to;
to = tmp;
}
return { from: from, to: to, axis: axis };
}
function setSelection(ranges, preventEvent) {
var axis, range, o = plot.getOptions();
if (o.selection.mode == "y") {
selection.first.x = 0;
selection.second.x = plot.width();
}
else {
range = extractRange(ranges, "x");
selection.first.x = range.axis.p2c(range.from);
selection.second.x = range.axis.p2c(range.to);
}
if (o.selection.mode == "x") {
selection.first.y = 0;
selection.second.y = plot.height();
}
else {
range = extractRange(ranges, "y");
selection.first.y = range.axis.p2c(range.from);
selection.second.y = range.axis.p2c(range.to);
}
selection.show = true;
plot.triggerRedrawOverlay();
if (!preventEvent && selectionIsSane())
triggerSelectedEvent();
}
function selectionIsSane() {
var minSize = 5;
return Math.abs(selection.second.x - selection.first.x) >= minSize &&
Math.abs(selection.second.y - selection.first.y) >= minSize;
}
plot.clearSelection = clearSelection;
plot.setSelection = setSelection;
plot.getSelection = getSelection;
plot.hooks.bindEvents.push(function(plot, eventHolder) {
var o = plot.getOptions();
if (o.selection.mode != null) {
eventHolder.mousemove(onMouseMove);
eventHolder.mousedown(onMouseDown);
}
});
plot.hooks.drawOverlay.push(function (plot, ctx) {
// draw selection
if (selection.show && selectionIsSane()) {
var plotOffset = plot.getPlotOffset();
var o = plot.getOptions();
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
var c = $.color.parse(o.selection.color);
ctx.strokeStyle = c.scale('a', 0.8).toString();
ctx.lineWidth = 1;
ctx.lineJoin = "round";
ctx.fillStyle = c.scale('a', 0.4).toString();
var x = Math.min(selection.first.x, selection.second.x) + 0.5,
y = Math.min(selection.first.y, selection.second.y) + 0.5,
w = Math.abs(selection.second.x - selection.first.x) - 1,
h = Math.abs(selection.second.y - selection.first.y) - 1;
ctx.fillRect(x, y, w, h);
ctx.strokeRect(x, y, w, h);
ctx.restore();
}
});
plot.hooks.shutdown.push(function (plot, eventHolder) {
eventHolder.unbind("mousemove", onMouseMove);
eventHolder.unbind("mousedown", onMouseDown);
if (mouseUpHandler)
$(document).unbind("mouseup", mouseUpHandler);
});
}
$.plot.plugins.push({
init: init,
options: {
selection: {
mode: null, // one of null, "x", "y" or "xy"
color: "#e8cfac"
}
},
name: 'selection',
version: '1.1'
});
})(jQuery);
| SquareSquash/web/vendor/assets/javascripts/flot/selection.js/0 | {
"file_path": "SquareSquash/web/vendor/assets/javascripts/flot/selection.js",
"repo_id": "SquareSquash",
"token_count": 5745
} | 128 |
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (Wed, 12 Feb 2014 03:42:24 GMT)
*
* @copyright
* Copyright (C) 2004-2013 Alex Gorbatchev.
*
* @license
* Dual licensed under the MIT and GPL licenses.
*/
;(function()
{
// CommonJS
SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
function Brush()
{
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
'case char class comp const constructor currency destructor div do double ' +
'downto else end except exports extended false file finalization finally ' +
'for function goto if implementation in inherited int64 initialization ' +
'integer interface is label library longint longword mod nil not object ' +
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
'pint64 pointer private procedure program property pshortstring pstring ' +
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
'record repeat set shl shortint shortstring shr single smallint string then ' +
'threadvar to true try type unit until uses val var varirnt while widechar ' +
'widestring with word write writeln xor';
this.regexList = [
{ regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
{ regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
{ regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
{ regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
];
};
Brush.prototype = new SyntaxHighlighter.Highlighter();
Brush.aliases = ['delphi', 'pascal', 'pas'];
SyntaxHighlighter.brushes.Delphi = Brush;
// CommonJS
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
})();
| SquareSquash/web/vendor/assets/javascripts/sh/shBrushDelphi.js/0 | {
"file_path": "SquareSquash/web/vendor/assets/javascripts/sh/shBrushDelphi.js",
"repo_id": "SquareSquash",
"token_count": 914
} | 129 |
# A stripped-down version of Configoro that works without any gems.
require 'erb'
require 'yaml'
load File.join(File.dirname(__FILE__), 'base.rb')
# @private
class Configoro::HashWithIndifferentAccess < ::Hash
def deep_merge(other_hash)
dup.deep_merge!(other_hash)
end
def deep_merge!(other_hash)
other_hash.each_pair do |k, v|
tv = self[k]
self[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v
end
self
end
end
load File.join(File.dirname(__FILE__), 'hash.rb')
| SquareSquash/web/vendor/configoro/simple.rb/0 | {
"file_path": "SquareSquash/web/vendor/configoro/simple.rb",
"repo_id": "SquareSquash",
"token_count": 223
} | 130 |
{
"printWidth": 100
}
| bitwarden/web/.prettierrc.json/0 | {
"file_path": "bitwarden/web/.prettierrc.json",
"repo_id": "bitwarden",
"token_count": 11
} | 131 |
<div class="form-group">
<label>{{ label }}</label>
<div class="input-group">
<input class="form-control" readonly [value]="controlValue" />
<div class="input-group-append" *ngIf="showLaunch">
<button
type="button"
class="btn btn-outline-secondary"
appA11yTitle="{{ 'launch' | i18n }}"
(click)="launchUri(controlValue)"
>
<i class="bwi bwi-lg bwi-external-link" aria-hidden="true"></i>
</button>
</div>
<div class="input-group-append" *ngIf="showCopy">
<button
type="button"
class="btn btn-outline-secondary"
appA11yTitle="{{ 'copyValue' | i18n }}"
(click)="copy(controlValue)"
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
| bitwarden/web/bitwarden_license/src/app/organizations/components/input-text-readonly.component.html/0 | {
"file_path": "bitwarden/web/bitwarden_license/src/app/organizations/components/input-text-readonly.component.html",
"repo_id": "bitwarden",
"token_count": 380
} | 132 |
<div class="page-header d-flex">
<h1>{{ "clients" | i18n }}</h1>
<div class="ml-auto d-flex">
<div>
<label class="sr-only" for="search">{{ "search" | i18n }}</label>
<input
type="search"
class="form-control form-control-sm"
id="search"
placeholder="{{ 'search' | i18n }}"
[(ngModel)]="searchText"
/>
</div>
<a class="btn btn-sm btn-outline-primary ml-3" routerLink="create" *ngIf="manageOrganizations">
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
{{ "newClientOrganization" | i18n }}
</a>
<button
class="btn btn-sm btn-outline-primary ml-3"
(click)="addExistingOrganization()"
*ngIf="manageOrganizations && showAddExisting"
>
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
{{ "addExistingOrganization" | i18n }}
</button>
</div>
</div>
<ng-container *ngIf="loading">
<i
class="bwi bwi-spinner bwi-spin text-muted"
title="{{ 'loading' | i18n }}"
aria-hidden="true"
></i>
<span class="sr-only">{{ "loading" | i18n }}</span>
</ng-container>
<ng-container
*ngIf="!loading && (clients | search: searchText:'organizationName':'id') as searchedClients"
>
<p *ngIf="!searchedClients.length">{{ "noClientsInList" | i18n }}</p>
<ng-container *ngIf="searchedClients.length">
<table
class="table table-hover table-list"
infiniteScroll
[infiniteScrollDistance]="1"
[infiniteScrollDisabled]="!isPaging()"
(scrolled)="loadMore()"
>
<tbody>
<tr *ngFor="let o of searchedClients">
<td width="30">
<app-avatar
[data]="o.organizationName"
size="25"
[circle]="true"
[fontSize]="14"
></app-avatar>
</td>
<td>
<a [routerLink]="['/organizations', o.organizationId]">{{ o.organizationName }}</a>
</td>
<td class="table-list-options" *ngIf="manageOrganizations">
<div class="dropdown" appListDropdown>
<button
class="btn btn-outline-secondary dropdown-toggle"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
appA11yTitle="{{ 'options' | i18n }}"
>
<i class="bwi bwi-cog bwi-lg" aria-hidden="true"></i>
</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item text-danger" href="#" appStopClick (click)="remove(o)">
<i class="bwi bwi-fw bwi-close" aria-hidden="true"></i>
{{ "remove" | i18n }}
</a>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</ng-container>
</ng-container>
<ng-template #add></ng-template>
| bitwarden/web/bitwarden_license/src/app/providers/clients/clients.component.html/0 | {
"file_path": "bitwarden/web/bitwarden_license/src/app/providers/clients/clients.component.html",
"repo_id": "bitwarden",
"token_count": 1491
} | 133 |
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="userAddEditTitle">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
<form
class="modal-content"
#form
(ngSubmit)="submit()"
[appApiAction]="formPromise"
ngNativeValidate
>
<div class="modal-header">
<h2 class="modal-title" id="userAddEditTitle">
{{ title }}
<small class="text-muted" *ngIf="name">{{ name }}</small>
</h2>
<button
type="button"
class="close"
data-dismiss="modal"
appA11yTitle="{{ 'close' | i18n }}"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" *ngIf="loading">
<i
class="bwi bwi-spinner bwi-spin text-muted"
title="{{ 'loading' | i18n }}"
aria-hidden="true"
></i>
<span class="sr-only">{{ "loading" | i18n }}</span>
</div>
<div class="modal-body" *ngIf="!loading">
<ng-container *ngIf="!editMode">
<p>{{ "providerInviteUserDesc" | i18n }}</p>
<div class="form-group mb-4">
<label for="emails">{{ "email" | i18n }}</label>
<input
id="emails"
class="form-control"
type="text"
name="Emails"
[(ngModel)]="emails"
required
appAutoFocus
/>
<small class="text-muted">{{ "inviteMultipleEmailDesc" | i18n: "20" }}</small>
</div>
</ng-container>
<h3>
{{ "userType" | i18n }}
<a
target="_blank"
rel="noopener"
appA11yTitle="{{ 'learnMore' | i18n }}"
href="https://bitwarden.com/help/provider-users/"
>
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
</a>
</h3>
<div class="form-check mt-2 form-check-block">
<input
class="form-check-input"
type="radio"
name="userType"
id="userTypeServiceUser"
[value]="userType.ServiceUser"
[(ngModel)]="type"
/>
<label class="form-check-label" for="userTypeServiceUser">
{{ "serviceUser" | i18n }}
<small>{{ "serviceUserDesc" | i18n }}</small>
</label>
</div>
<div class="form-check mt-2 form-check-block">
<input
class="form-check-input"
type="radio"
name="userType"
id="userTypeProviderAdmin"
[value]="userType.ProviderAdmin"
[(ngModel)]="type"
/>
<label class="form-check-label" for="userTypeProviderAdmin">
{{ "providerAdmin" | i18n }}
<small>{{ "providerAdminDesc" | i18n }}</small>
</label>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
<i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
<span>{{ "save" | i18n }}</span>
</button>
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
{{ "cancel" | i18n }}
</button>
<div class="ml-auto">
<button
#deleteBtn
type="button"
(click)="delete()"
class="btn btn-outline-danger"
appA11yTitle="{{ 'delete' | i18n }}"
*ngIf="editMode"
[disabled]="deleteBtn.loading"
[appApiAction]="deletePromise"
>
<i
class="bwi bwi-trash bwi-lg bwi-fw"
[hidden]="deleteBtn.loading"
aria-hidden="true"
></i>
<i
class="bwi bwi-spinner bwi-spin bwi-lg bwi-fw"
[hidden]="!deleteBtn.loading"
title="{{ 'loading' | i18n }}"
aria-hidden="true"
></i>
</button>
</div>
</div>
</form>
</div>
</div>
| bitwarden/web/bitwarden_license/src/app/providers/manage/user-add-edit.component.html/0 | {
"file_path": "bitwarden/web/bitwarden_license/src/app/providers/manage/user-add-edit.component.html",
"repo_id": "bitwarden",
"token_count": 2306
} | 134 |
function load(envName) {
return {
...require("./config/base.json"),
...loadConfig(envName),
...loadConfig("local"),
dev: {
...require("./config/base.json").dev,
...loadConfig(envName).dev,
...loadConfig("local").dev,
},
};
}
function log(configObj) {
const repeatNum = 50;
console.log(`${"=".repeat(repeatNum)}\nenvConfig`);
console.log(JSON.stringify(configObj, null, 2));
console.log(`${"=".repeat(repeatNum)}`);
}
function loadConfig(configName) {
try {
return require(`./config/${configName}.json`);
} catch (e) {
if (e instanceof Error && e.code === "MODULE_NOT_FOUND") {
return {};
} else {
throw e;
}
}
}
module.exports = {
load,
log,
};
| bitwarden/web/config.js/0 | {
"file_path": "bitwarden/web/config.js",
"repo_id": "bitwarden",
"token_count": 308
} | 135 |
@font-face {
font-family: "Open Sans";
font-style: italic;
font-weight: 300;
src: url(../fonts/Open_Sans-italic-300.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: italic;
font-weight: 400;
src: url(../fonts/Open_Sans-italic-400.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: italic;
font-weight: 600;
src: url(../fonts/Open_Sans-italic-600.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: italic;
font-weight: 700;
src: url(../fonts/Open_Sans-italic-700.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: italic;
font-weight: 800;
src: url(../fonts/Open_Sans-italic-800.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 300;
src: url(../fonts/Open_Sans-normal-300.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
src: url(../fonts/Open_Sans-normal-400.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 600;
src: url(../fonts/Open_Sans-normal-600.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
src: url(../fonts/Open_Sans-normal-700.woff) format("woff");
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 800;
src: url(../fonts/Open_Sans-normal-800.woff) format("woff");
unicode-range: U+0-10FFFF;
}
body {
font-family: "Open Sans";
}
html,
body,
.row {
height: 100%;
-webkit-font-smoothing: antialiased;
}
h2 {
font-size: 25px;
margin-bottom: 12.5px;
font-weight: 500;
line-height: 1.1;
}
.brand {
font-size: 23px;
line-height: 25px;
color: #fff;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.banner {
background-color: #175ddc;
height: 56px;
}
.content {
padding-top: 20px;
padding-bottom: 20px;
padding-left: 15px;
padding-right: 15px;
}
.footer {
padding: 40px 0 40px 0;
border-top: 1px solid #dee2e6;
}
/* Bitwarden icons, manually copied */
@font-face {
font-family: "bwi-font";
src: url(../images/bwi-font.svg) format("svg"), url(../fonts/bwi-font.ttf) format("truetype"),
url(../fonts/bwi-font.woff) format("woff"), url(../fonts/bwi-font.woff2) format("woff2");
font-weight: normal;
font-style: normal;
font-display: block;
}
.bwi {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: "bwi-font" !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
display: inline-block;
/* Better Font Rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.bwi-shield:before {
content: "\e932";
}
| bitwarden/web/src/404/styles.css/0 | {
"file_path": "bitwarden/web/src/404/styles.css",
"repo_id": "bitwarden",
"token_count": 1331
} | 136 |
import { Component } from "@angular/core";
import { Router } from "@angular/router";
import { ApiService } from "jslib-common/abstractions/api.service";
import { AuthService } from "jslib-common/abstractions/auth.service";
import { CryptoService } from "jslib-common/abstractions/crypto.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { LogService } from "jslib-common/abstractions/log.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { TwoFactorRecoveryRequest } from "jslib-common/models/request/twoFactorRecoveryRequest";
@Component({
selector: "app-recover-two-factor",
templateUrl: "recover-two-factor.component.html",
})
export class RecoverTwoFactorComponent {
email: string;
masterPassword: string;
recoveryCode: string;
formPromise: Promise<any>;
constructor(
private router: Router,
private apiService: ApiService,
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private cryptoService: CryptoService,
private authService: AuthService,
private logService: LogService
) {}
async submit() {
try {
const request = new TwoFactorRecoveryRequest();
request.recoveryCode = this.recoveryCode.replace(/\s/g, "").toLowerCase();
request.email = this.email.trim().toLowerCase();
const key = await this.authService.makePreloginKey(this.masterPassword, request.email);
request.masterPasswordHash = await this.cryptoService.hashPassword(this.masterPassword, key);
this.formPromise = this.apiService.postTwoFactorRecover(request);
await this.formPromise;
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("twoStepRecoverDisabled")
);
this.router.navigate(["/"]);
} catch (e) {
this.logService.error(e);
}
}
}
| bitwarden/web/src/app/accounts/recover-two-factor.component.ts/0 | {
"file_path": "bitwarden/web/src/app/accounts/recover-two-factor.component.ts",
"repo_id": "bitwarden",
"token_count": 664
} | 137 |
import { Component } from "@angular/core";
import { UpdateTempPasswordComponent as BaseUpdateTempPasswordComponent } from "jslib-angular/components/update-temp-password.component";
import { ApiService } from "jslib-common/abstractions/api.service";
import { CryptoService } from "jslib-common/abstractions/crypto.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { LogService } from "jslib-common/abstractions/log.service";
import { MessagingService } from "jslib-common/abstractions/messaging.service";
import { PasswordGenerationService } from "jslib-common/abstractions/passwordGeneration.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { PolicyService } from "jslib-common/abstractions/policy.service";
import { StateService } from "jslib-common/abstractions/state.service";
import { SyncService } from "jslib-common/abstractions/sync.service";
@Component({
selector: "app-update-temp-password",
templateUrl: "update-temp-password.component.html",
})
export class UpdateTempPasswordComponent extends BaseUpdateTempPasswordComponent {
constructor(
i18nService: I18nService,
platformUtilsService: PlatformUtilsService,
passwordGenerationService: PasswordGenerationService,
policyService: PolicyService,
cryptoService: CryptoService,
messagingService: MessagingService,
apiService: ApiService,
logService: LogService,
stateService: StateService,
syncService: SyncService
) {
super(
i18nService,
platformUtilsService,
passwordGenerationService,
policyService,
cryptoService,
messagingService,
apiService,
stateService,
syncService,
logService
);
}
}
| bitwarden/web/src/app/accounts/update-temp-password.component.ts/0 | {
"file_path": "bitwarden/web/src/app/accounts/update-temp-password.component.ts",
"repo_id": "bitwarden",
"token_count": 563
} | 138 |
import { Component } from "@angular/core";
import { PasswordRepromptComponent as BasePasswordRepromptComponent } from "jslib-angular/components/password-reprompt.component";
@Component({
templateUrl: "password-reprompt.component.html",
})
export class PasswordRepromptComponent extends BasePasswordRepromptComponent {}
| bitwarden/web/src/app/components/password-reprompt.component.ts/0 | {
"file_path": "bitwarden/web/src/app/components/password-reprompt.component.ts",
"repo_id": "bitwarden",
"token_count": 80
} | 139 |
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
import { SearchPipe } from "jslib-angular/pipes/search.pipe";
import { ApiService } from "jslib-common/abstractions/api.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { LogService } from "jslib-common/abstractions/log.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { OrganizationUserStatusType } from "jslib-common/enums/organizationUserStatusType";
import { OrganizationUserType } from "jslib-common/enums/organizationUserType";
import { Utils } from "jslib-common/misc/utils";
import { SelectionReadOnlyRequest } from "jslib-common/models/request/selectionReadOnlyRequest";
import { OrganizationUserUserDetailsResponse } from "jslib-common/models/response/organizationUserResponse";
@Component({
selector: "app-entity-users",
templateUrl: "entity-users.component.html",
providers: [SearchPipe],
})
export class EntityUsersComponent implements OnInit {
@Input() entity: "group" | "collection";
@Input() entityId: string;
@Input() entityName: string;
@Input() organizationId: string;
@Output() onEditedUsers = new EventEmitter();
organizationUserType = OrganizationUserType;
organizationUserStatusType = OrganizationUserStatusType;
showSelected = false;
loading = true;
formPromise: Promise<any>;
selectedCount = 0;
searchText: string;
private allUsers: OrganizationUserUserDetailsResponse[] = [];
constructor(
private search: SearchPipe,
private apiService: ApiService,
private i18nService: I18nService,
private platformUtilsService: PlatformUtilsService,
private logService: LogService
) {}
async ngOnInit() {
await this.loadUsers();
this.loading = false;
}
get users() {
if (this.showSelected) {
return this.allUsers.filter((u) => (u as any).checked);
} else {
return this.allUsers;
}
}
get searchedUsers() {
return this.search.transform(this.users, this.searchText, "name", "email", "id");
}
get scrollViewportStyle() {
return `min-height: 120px; height: ${120 + this.searchedUsers.length * 46}px`;
}
async loadUsers() {
const users = await this.apiService.getOrganizationUsers(this.organizationId);
this.allUsers = users.data.map((r) => r).sort(Utils.getSortFunction(this.i18nService, "email"));
if (this.entity === "group") {
const response = await this.apiService.getGroupUsers(this.organizationId, this.entityId);
if (response != null && users.data.length > 0) {
response.forEach((s) => {
const user = users.data.filter((u) => u.id === s);
if (user != null && user.length > 0) {
(user[0] as any).checked = true;
}
});
}
} else if (this.entity === "collection") {
const response = await this.apiService.getCollectionUsers(this.organizationId, this.entityId);
if (response != null && users.data.length > 0) {
response.forEach((s) => {
const user = users.data.filter((u) => !u.accessAll && u.id === s.id);
if (user != null && user.length > 0) {
(user[0] as any).checked = true;
(user[0] as any).readOnly = s.readOnly;
(user[0] as any).hidePasswords = s.hidePasswords;
}
});
}
}
this.allUsers.forEach((u) => {
if (this.entity === "collection" && u.accessAll) {
(u as any).checked = true;
}
if ((u as any).checked) {
this.selectedCount++;
}
});
}
check(u: OrganizationUserUserDetailsResponse) {
if (this.entity === "collection" && u.accessAll) {
return;
}
(u as any).checked = !(u as any).checked;
this.selectedChanged(u);
}
selectedChanged(u: OrganizationUserUserDetailsResponse) {
if ((u as any).checked) {
this.selectedCount++;
} else {
if (this.entity === "collection") {
(u as any).readOnly = false;
(u as any).hidePasswords = false;
}
this.selectedCount--;
}
}
filterSelected(showSelected: boolean) {
this.showSelected = showSelected;
}
async submit() {
try {
if (this.entity === "group") {
const selections = this.users.filter((u) => (u as any).checked).map((u) => u.id);
this.formPromise = this.apiService.putGroupUsers(
this.organizationId,
this.entityId,
selections
);
} else {
const selections = this.users
.filter((u) => (u as any).checked && !u.accessAll)
.map(
(u) =>
new SelectionReadOnlyRequest(u.id, !!(u as any).readOnly, !!(u as any).hidePasswords)
);
this.formPromise = this.apiService.putCollectionUsers(
this.organizationId,
this.entityId,
selections
);
}
await this.formPromise;
this.platformUtilsService.showToast("success", null, this.i18nService.t("updatedUsers"));
this.onEditedUsers.emit();
} catch (e) {
this.logService.error(e);
}
}
}
| bitwarden/web/src/app/modules/organizations/manage/entity-users.component.ts/0 | {
"file_path": "bitwarden/web/src/app/modules/organizations/manage/entity-users.component.ts",
"repo_id": "bitwarden",
"token_count": 2000
} | 140 |
<ng-container *ngIf="!loaded">
<i
class="bwi bwi-spinner bwi-spin text-muted tw-m-2"
title="{{ 'loading' | i18n }}"
aria-hidden="true"
></i>
<span class="sr-only">{{ "loading" | i18n }}</span>
</ng-container>
<div *ngIf="loaded" class="tw-max-w-[300px] tw-min-w-[200px] tw-flex tw-flex-col">
<button
*ngIf="allowEnrollmentChanges(organization) && !organization.resetPasswordEnrolled"
class="dropdown-item"
(click)="toggleResetPasswordEnrollment(organization)"
>
<i class="bwi bwi-fw bwi-key" aria-hidden="true"></i>
{{ "enrollPasswordReset" | i18n }}
</button>
<button
*ngIf="allowEnrollmentChanges(organization) && organization.resetPasswordEnrolled"
class="dropdown-item"
(click)="toggleResetPasswordEnrollment(organization)"
>
<i class="bwi bwi-fw bwi-undo" aria-hidden="true"></i>
{{ "withdrawPasswordReset" | i18n }}
</button>
<ng-container *ngIf="organization.useSso && organization.identifier">
<button
*ngIf="organization.ssoBound; else linkSso"
class="dropdown-item"
(click)="unlinkSso(organization)"
>
<i class="bwi bwi-fw bwi-chain-broken" aria-hidden="true"></i>
{{ "unlinkSso" | i18n }}
</button>
<ng-template #linkSso>
<app-link-sso [organization]="organization"> </app-link-sso>
</ng-template>
</ng-container>
<button class="dropdown-item text-danger" (click)="leave(organization)">
<i class="bwi bwi-fw bwi-sign-out" aria-hidden="true"></i>
{{ "leave" | i18n }}
</button>
</div>
| bitwarden/web/src/app/modules/vault-filter/components/organization-options.component.html/0 | {
"file_path": "bitwarden/web/src/app/modules/vault-filter/components/organization-options.component.html",
"repo_id": "bitwarden",
"token_count": 641
} | 141 |
<button
bitBadge
[style.color]="textColor"
[style.background-color]="color"
appA11yTitle="{{ organizationName }}"
(click)="emitOnOrganizationClicked()"
>
{{ organizationName | ellipsis: 13 }}
</button>
| bitwarden/web/src/app/modules/vault/modules/organization-badge/organization-name-badge.component.html/0 | {
"file_path": "bitwarden/web/src/app/modules/vault/modules/organization-badge/organization-name-badge.component.html",
"repo_id": "bitwarden",
"token_count": 77
} | 142 |
import { Component } from "@angular/core";
import { OrganizationUserStatusType } from "jslib-common/enums/organizationUserStatusType";
import { ProviderUserStatusType } from "jslib-common/enums/providerUserStatusType";
export interface BulkUserDetails {
id: string;
name: string;
email: string;
status: OrganizationUserStatusType | ProviderUserStatusType;
}
type BulkStatusEntry = {
user: BulkUserDetails;
error: boolean;
message: string;
};
@Component({
selector: "app-bulk-status",
templateUrl: "bulk-status.component.html",
})
export class BulkStatusComponent {
users: BulkStatusEntry[];
loading = false;
}
| bitwarden/web/src/app/organizations/manage/bulk/bulk-status.component.ts/0 | {
"file_path": "bitwarden/web/src/app/organizations/manage/bulk/bulk-status.component.ts",
"repo_id": "bitwarden",
"token_count": 192
} | 143 |
import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { first } from "rxjs/operators";
import { SearchPipe } from "jslib-angular/pipes/search.pipe";
import { UserNamePipe } from "jslib-angular/pipes/user-name.pipe";
import { ModalService } from "jslib-angular/services/modal.service";
import { ValidationService } from "jslib-angular/services/validation.service";
import { ApiService } from "jslib-common/abstractions/api.service";
import { CryptoService } from "jslib-common/abstractions/crypto.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { LogService } from "jslib-common/abstractions/log.service";
import { OrganizationService } from "jslib-common/abstractions/organization.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { PolicyService } from "jslib-common/abstractions/policy.service";
import { SearchService } from "jslib-common/abstractions/search.service";
import { StateService } from "jslib-common/abstractions/state.service";
import { SyncService } from "jslib-common/abstractions/sync.service";
import { OrganizationUserStatusType } from "jslib-common/enums/organizationUserStatusType";
import { OrganizationUserType } from "jslib-common/enums/organizationUserType";
import { PolicyType } from "jslib-common/enums/policyType";
import { OrganizationKeysRequest } from "jslib-common/models/request/organizationKeysRequest";
import { OrganizationUserBulkRequest } from "jslib-common/models/request/organizationUserBulkRequest";
import { OrganizationUserConfirmRequest } from "jslib-common/models/request/organizationUserConfirmRequest";
import { ListResponse } from "jslib-common/models/response/listResponse";
import { OrganizationUserBulkResponse } from "jslib-common/models/response/organizationUserBulkResponse";
import { OrganizationUserUserDetailsResponse } from "jslib-common/models/response/organizationUserResponse";
import { BasePeopleComponent } from "../../common/base.people.component";
import { BulkConfirmComponent } from "./bulk/bulk-confirm.component";
import { BulkRemoveComponent } from "./bulk/bulk-remove.component";
import { BulkStatusComponent } from "./bulk/bulk-status.component";
import { EntityEventsComponent } from "./entity-events.component";
import { ResetPasswordComponent } from "./reset-password.component";
import { UserAddEditComponent } from "./user-add-edit.component";
import { UserGroupsComponent } from "./user-groups.component";
@Component({
selector: "app-org-people",
templateUrl: "people.component.html",
})
export class PeopleComponent
extends BasePeopleComponent<OrganizationUserUserDetailsResponse>
implements OnInit
{
@ViewChild("addEdit", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef;
@ViewChild("groupsTemplate", { read: ViewContainerRef, static: true })
groupsModalRef: ViewContainerRef;
@ViewChild("eventsTemplate", { read: ViewContainerRef, static: true })
eventsModalRef: ViewContainerRef;
@ViewChild("confirmTemplate", { read: ViewContainerRef, static: true })
confirmModalRef: ViewContainerRef;
@ViewChild("resetPasswordTemplate", { read: ViewContainerRef, static: true })
resetPasswordModalRef: ViewContainerRef;
@ViewChild("bulkStatusTemplate", { read: ViewContainerRef, static: true })
bulkStatusModalRef: ViewContainerRef;
@ViewChild("bulkConfirmTemplate", { read: ViewContainerRef, static: true })
bulkConfirmModalRef: ViewContainerRef;
@ViewChild("bulkRemoveTemplate", { read: ViewContainerRef, static: true })
bulkRemoveModalRef: ViewContainerRef;
userType = OrganizationUserType;
userStatusType = OrganizationUserStatusType;
organizationId: string;
status: OrganizationUserStatusType = null;
accessEvents = false;
accessGroups = false;
canResetPassword = false; // User permission (admin/custom)
orgUseResetPassword = false; // Org plan ability
orgHasKeys = false; // Org public/private keys
orgResetPasswordPolicyEnabled = false;
callingUserType: OrganizationUserType = null;
constructor(
apiService: ApiService,
private route: ActivatedRoute,
i18nService: I18nService,
modalService: ModalService,
platformUtilsService: PlatformUtilsService,
cryptoService: CryptoService,
private router: Router,
searchService: SearchService,
validationService: ValidationService,
private policyService: PolicyService,
logService: LogService,
searchPipe: SearchPipe,
userNamePipe: UserNamePipe,
private syncService: SyncService,
stateService: StateService,
private organizationService: OrganizationService
) {
super(
apiService,
searchService,
i18nService,
platformUtilsService,
cryptoService,
validationService,
modalService,
logService,
searchPipe,
userNamePipe,
stateService
);
}
async ngOnInit() {
this.route.parent.parent.params.subscribe(async (params) => {
this.organizationId = params.organizationId;
const organization = await this.organizationService.get(this.organizationId);
if (!organization.canManageUsers) {
this.router.navigate(["../collections"], { relativeTo: this.route });
return;
}
this.accessEvents = organization.useEvents;
this.accessGroups = organization.useGroups;
this.canResetPassword = organization.canManageUsersPassword;
this.orgUseResetPassword = organization.useResetPassword;
this.callingUserType = organization.type;
this.orgHasKeys = organization.hasPublicAndPrivateKeys;
// Backfill pub/priv key if necessary
if (this.canResetPassword && !this.orgHasKeys) {
const orgShareKey = await this.cryptoService.getOrgKey(this.organizationId);
const orgKeys = await this.cryptoService.makeKeyPair(orgShareKey);
const request = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);
const response = await this.apiService.postOrganizationKeys(this.organizationId, request);
if (response != null) {
this.orgHasKeys = response.publicKey != null && response.privateKey != null;
await this.syncService.fullSync(true); // Replace oganizations with new data
} else {
throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));
}
}
await this.load();
this.route.queryParams.pipe(first()).subscribe(async (qParams) => {
this.searchText = qParams.search;
if (qParams.viewEvents != null) {
const user = this.users.filter((u) => u.id === qParams.viewEvents);
if (user.length > 0 && user[0].status === OrganizationUserStatusType.Confirmed) {
this.events(user[0]);
}
}
});
});
}
async load() {
const resetPasswordPolicy = await this.policyService.getPolicyForOrganization(
PolicyType.ResetPassword,
this.organizationId
);
this.orgResetPasswordPolicyEnabled = resetPasswordPolicy?.enabled;
super.load();
}
getUsers(): Promise<ListResponse<OrganizationUserUserDetailsResponse>> {
return this.apiService.getOrganizationUsers(this.organizationId);
}
deleteUser(id: string): Promise<any> {
return this.apiService.deleteOrganizationUser(this.organizationId, id);
}
reinviteUser(id: string): Promise<any> {
return this.apiService.postOrganizationUserReinvite(this.organizationId, id);
}
async confirmUser(
user: OrganizationUserUserDetailsResponse,
publicKey: Uint8Array
): Promise<any> {
const orgKey = await this.cryptoService.getOrgKey(this.organizationId);
const key = await this.cryptoService.rsaEncrypt(orgKey.key, publicKey.buffer);
const request = new OrganizationUserConfirmRequest();
request.key = key.encryptedString;
await this.apiService.postOrganizationUserConfirm(this.organizationId, user.id, request);
}
allowResetPassword(orgUser: OrganizationUserUserDetailsResponse): boolean {
// Hierarchy check
let callingUserHasPermission = false;
switch (this.callingUserType) {
case OrganizationUserType.Owner:
callingUserHasPermission = true;
break;
case OrganizationUserType.Admin:
callingUserHasPermission = orgUser.type !== OrganizationUserType.Owner;
break;
case OrganizationUserType.Custom:
callingUserHasPermission =
orgUser.type !== OrganizationUserType.Owner &&
orgUser.type !== OrganizationUserType.Admin;
break;
}
// Final
return (
this.canResetPassword &&
callingUserHasPermission &&
this.orgUseResetPassword &&
this.orgHasKeys &&
orgUser.resetPasswordEnrolled &&
this.orgResetPasswordPolicyEnabled &&
orgUser.status === OrganizationUserStatusType.Confirmed
);
}
showEnrolledStatus(orgUser: OrganizationUserUserDetailsResponse): boolean {
return (
this.orgUseResetPassword &&
orgUser.resetPasswordEnrolled &&
this.orgResetPasswordPolicyEnabled
);
}
async edit(user: OrganizationUserUserDetailsResponse) {
const [modal] = await this.modalService.openViewRef(
UserAddEditComponent,
this.addEditModalRef,
(comp) => {
comp.name = this.userNamePipe.transform(user);
comp.organizationId = this.organizationId;
comp.organizationUserId = user != null ? user.id : null;
comp.usesKeyConnector = user?.usesKeyConnector;
comp.onSavedUser.subscribe(() => {
modal.close();
this.load();
});
comp.onDeletedUser.subscribe(() => {
modal.close();
this.removeUser(user);
});
}
);
}
async groups(user: OrganizationUserUserDetailsResponse) {
const [modal] = await this.modalService.openViewRef(
UserGroupsComponent,
this.groupsModalRef,
(comp) => {
comp.name = this.userNamePipe.transform(user);
comp.organizationId = this.organizationId;
comp.organizationUserId = user != null ? user.id : null;
comp.onSavedUser.subscribe(() => {
modal.close();
});
}
);
}
async bulkRemove() {
if (this.actionPromise != null) {
return;
}
const [modal] = await this.modalService.openViewRef(
BulkRemoveComponent,
this.bulkRemoveModalRef,
(comp) => {
comp.organizationId = this.organizationId;
comp.users = this.getCheckedUsers();
}
);
await modal.onClosedPromise();
await this.load();
}
async bulkReinvite() {
if (this.actionPromise != null) {
return;
}
const users = this.getCheckedUsers();
const filteredUsers = users.filter((u) => u.status === OrganizationUserStatusType.Invited);
if (filteredUsers.length <= 0) {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("noSelectedUsersApplicable")
);
return;
}
try {
const request = new OrganizationUserBulkRequest(filteredUsers.map((user) => user.id));
const response = this.apiService.postManyOrganizationUserReinvite(
this.organizationId,
request
);
this.showBulkStatus(
users,
filteredUsers,
response,
this.i18nService.t("bulkReinviteMessage")
);
} catch (e) {
this.validationService.showError(e);
}
this.actionPromise = null;
}
async bulkConfirm() {
if (this.actionPromise != null) {
return;
}
const [modal] = await this.modalService.openViewRef(
BulkConfirmComponent,
this.bulkConfirmModalRef,
(comp) => {
comp.organizationId = this.organizationId;
comp.users = this.getCheckedUsers();
}
);
await modal.onClosedPromise();
await this.load();
}
async events(user: OrganizationUserUserDetailsResponse) {
await this.modalService.openViewRef(EntityEventsComponent, this.eventsModalRef, (comp) => {
comp.name = this.userNamePipe.transform(user);
comp.organizationId = this.organizationId;
comp.entityId = user.id;
comp.showUser = false;
comp.entity = "user";
});
}
async resetPassword(user: OrganizationUserUserDetailsResponse) {
const [modal] = await this.modalService.openViewRef(
ResetPasswordComponent,
this.resetPasswordModalRef,
(comp) => {
comp.name = this.userNamePipe.transform(user);
comp.email = user != null ? user.email : null;
comp.organizationId = this.organizationId;
comp.id = user != null ? user.id : null;
comp.onPasswordReset.subscribe(() => {
modal.close();
this.load();
});
}
);
}
protected deleteWarningMessage(user: OrganizationUserUserDetailsResponse): string {
if (user.usesKeyConnector) {
return this.i18nService.t("removeUserConfirmationKeyConnector");
}
return super.deleteWarningMessage(user);
}
private async showBulkStatus(
users: OrganizationUserUserDetailsResponse[],
filteredUsers: OrganizationUserUserDetailsResponse[],
request: Promise<ListResponse<OrganizationUserBulkResponse>>,
successfullMessage: string
) {
const [modal, childComponent] = await this.modalService.openViewRef(
BulkStatusComponent,
this.bulkStatusModalRef,
(comp) => {
comp.loading = true;
}
);
// Workaround to handle closing the modal shortly after it has been opened
let close = false;
modal.onShown.subscribe(() => {
if (close) {
modal.close();
}
});
try {
const response = await request;
if (modal) {
const keyedErrors: any = response.data
.filter((r) => r.error !== "")
.reduce((a, x) => ({ ...a, [x.id]: x.error }), {});
const keyedFilteredUsers: any = filteredUsers.reduce((a, x) => ({ ...a, [x.id]: x }), {});
childComponent.users = users.map((user) => {
let message = keyedErrors[user.id] ?? successfullMessage;
// eslint-disable-next-line
if (!keyedFilteredUsers.hasOwnProperty(user.id)) {
message = this.i18nService.t("bulkFilteredMessage");
}
return {
user: user,
error: keyedErrors.hasOwnProperty(user.id), // eslint-disable-line
message: message,
};
});
childComponent.loading = false;
}
} catch {
close = true;
modal.close();
}
}
}
| bitwarden/web/src/app/organizations/manage/people.component.ts/0 | {
"file_path": "bitwarden/web/src/app/organizations/manage/people.component.ts",
"repo_id": "bitwarden",
"token_count": 5362
} | 144 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.