text
stringlengths
1
2.83M
id
stringlengths
16
152
metadata
dict
__index_level_0__
int64
0
949
(function($) { /** * Japanese language package * Translated by @tsuyoshifujii */ $.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, { base64: { 'default': '有効なBase64エンコードを入力してください' }, 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': '有効な16進数を入力してください。' }, hexColor: { 'default': '有効なカラーコード(RGB 16進数)を入力してください' }, iban: { 'default': '有効なIBANコードを入力してください', countryNotSupported: 'カントリーコード%sはサポートされていません', country: '有効な%sのIBANコードを入力してください', countries: { AD: 'アンドラ', AE: 'アラブ首長国連邦', AL: 'アルバニア', AO: 'アンゴラ', AT: 'オーストリア', AZ: 'アゼルバイジャン', BA: 'ボスニア·ヘルツェゴビナ', BE: 'ベルギー', BF: 'ブルキナファソ', BG: 'ブルガリア', BH: 'バーレーン', BI: 'ブルンジ', BJ: 'ベナン', BR: 'ブラジル', CH: 'スイス', CI: '象牙海岸', CM: 'カメルーン', CR: 'コスタリカ', CV: 'カーボベルデ', 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: 'サン·マリノ', SN: 'セネガル', TN: 'チュニジア', TR: 'トルコ', VG: '英領バージン諸島' } }, id: { 'default': '有効なIDを入力してください', countryNotSupported: 'カントリーコード%sはサポートされていません', country: '有効な%sのIDを入力してください', countries: { BA: 'スニア·ヘルツェゴビナ', BG: 'ブルガリア', BR: 'ブラジル', CH: 'スイス', CL: 'チリ', CN: 'チャイナ', CZ: 'チェコ共和国', DK: 'デンマーク', EE: 'エストニア', ES: 'スペイン', FI: 'フィンランド', HR: 'クロアチア', IE: 'アイルランド', IS: 'アイスランド', LT: 'リトアニア', LV: 'ラトビア', ME: 'モンテネグロ', MK: 'マケドニア', NL: 'オランダ', RO: 'ルーマニア', RS: 'セルビア', SE: 'スウェーデン', SI: 'スロベニア', SK: 'スロバキア', SM: 'サン·マリノ', 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': '%sの有効なステップを入力してください' }, stringCase: { 'default': '小文字のみで入力してください', upper: '大文字のみで入力してください' }, stringLength: { 'default': '有効な長さの値を入力してください', less: '%s文字未満で入力してください', more: '%s文字より大きく入力してください', between: '%s文字から%s文字の間で入力してください' }, uri: { 'default': '有効なURIを入力してください。' }, uuid: { 'default': '有効なUUIDを入力してください', version: '有効なバージョン%s UUIDを入力してください' }, vat: { 'default': '有効なVAT番号を入力してください', countryNotSupported: 'カントリーコード%sはサポートされていません', country: '有効な%sのVAT番号を入力してください', countries: { AT: 'オーストリア', BE: 'ベルギー', BG: 'ブルガリア', BR: 'ブラジル', CH: 'スイス', 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: 'カナダ', CH: 'スイス', 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/ja_JP.js/0
{ "file_path": "Humsen/web/web-mobile/WebContent/plugins/validator/js/language/ja_JP.js", "repo_id": "Humsen", "token_count": 8681 }
51
(function($) { /** * Traditional Chinese language package * Translated by @tureki */ $.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, { base64: { 'default': '請輸入有效的Base64編碼' }, 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': '請輸入有效的EMAIL' }, file: { 'default': '請選擇有效的檔案' }, greaterThan: { 'default' : '請輸入大於等於 %s 的值', notInclusive : '請輸入大於 %s 的值' }, grid: { 'default': '請輸入有效的GRId編碼' }, hex: { 'default': '請輸入有效的16位元碼' }, hexColor: { 'default': '請輸入有效的16位元色碼' }, iban: { 'default': '請輸入有效的IBAN(國際銀行賬戶)號碼', countryNotSupported: '不支援 %s 國家', country: '請輸入有效的 %s 國家的IBAN(國際銀行賬戶)號碼', countries: { AD: '安道​​爾', AE: '阿聯酋', AL: '阿爾巴尼亞', AO: '安哥拉', AT: '奧地利', AZ: '阿塞拜疆', BA: '波斯尼亞和黑塞哥維那', BE: '比利時', BF: '布基納法索', BG: '保加利亞', BH: '巴林', BI: '布隆迪', BJ: '貝寧', BR: '巴西', CH: '瑞士', CI: '象牙海岸', CM: '喀麥隆', CR: '哥斯達黎加', CV: '佛得角', 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: '聖馬力諾', SN: '塞內加爾', TN: '突尼斯', TR: '土耳其', VG: '英屬維爾京群島' } }, id: { 'default': '請輸入有效的身份證字號', countryNotSupported: '不支援 %s 國家', country: '請輸入有效的 %s 身份證字號', countries: { BA: '波赫', BG: '保加利亞', BR: '巴西', CH: '瑞士', CL: '智利', CN: '中國', CZ: '捷克共和國', DK: '丹麥', EE: '愛沙尼亞', ES: '西班牙', FI: '芬蘭', HR: '克羅地亞', IE: '愛爾蘭', IS: '冰島', LT: '立陶宛', LV: '拉脫維亞', ME: '蒙特內哥羅', MK: '馬其頓', NL: '荷蘭', RO: '羅馬尼亞', RS: '塞爾維亞', SE: '瑞典', SI: '斯洛文尼亞', SK: '斯洛伐克', SM: '聖馬力諾', 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': '請輸入 %s 的倍數' }, stringCase: { 'default': '只能輸入小寫字母', upper: '只能輸入大寫字母' }, stringLength: { 'default': '請輸入符合長度限制的值', less: '請輸入小於 %s 個字', more: '請輸入大於 %s 個字', between: '請輸入 %s 至 %s 個字' }, uri: { 'default': '請輸入一個有效的鏈接' }, uuid: { 'default': '請輸入有效的UUID', version: '請輸入版本 %s 的UUID' }, vat: { 'default': '請輸入有效的VAT(增值税)', countryNotSupported: '不支援 %s 國家', country: '請輸入有效的 %s 國家的VAT(增值税)', countries: { AT: '奧地利', BE: '比利時', BG: '保加利亞', BR: '巴西', CH: '瑞士', 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: '加拿大', CH: '瑞士', 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/zh_TW.js/0
{ "file_path": "Humsen/web/web-mobile/WebContent/plugins/validator/js/language/zh_TW.js", "repo_id": "Humsen", "token_count": 9268 }
52
@charset "UTF-8"; #bar_right { float: left; width: 18%; } .sidebar-module { padding: 15px; background-color: #f5f5f5; border-radius: 4px; margin: 0 -15px 15px; font-size: 14px; } .list-unstyled { padding-left: 0; list-style: none; } .sidebar-module h4 { font-family: NSimSun; }
Humsen/web/web-pc/WebContent/css/navigation/rightbar.css/0
{ "file_path": "Humsen/web/web-pc/WebContent/css/navigation/rightbar.css", "repo_id": "Humsen", "token_count": 139 }
53
/** * 加载某篇详细的博客的js * * @author 何明胜 * * 2017年11月8日 */ $(document).ready(function() { // 如果删除博客按钮存在,绑定点击事件 var $btnDeleteBlog = $('#btn_deleteBlog'); if ($btnDeleteBlog.length > 0) { $btnDeleteBlog.click(deleteBlogClick); } }); /** * 删除博客按钮点击 * * @returns */ function deleteBlogClick() { $.confirm({ title : '删除博客确认', content : '是否确定删除这篇博客?', type : 'green', buttons : { ok : { text : '确定', btnClass : 'btn-primary', keys : [ 'enter' ], action : function() { deleteRemoteBlogLogic(); } }, cancel : { text : '否,点错了', btnClass : 'btn-primary', keys : [ 'ESC' ], } } }); } /** * 逻辑删除某篇博客 * * @returns */ function deleteRemoteBlogLogic() { $.post('/article/delete.hms', { type : 'logic_delete_blog', blogId : $('#hiden_blogId').val() }, function(response) { if (response == 1) { // 删除成功,跳转到博客目录界面 window.location = "/module/blog.hms"; } }, 'json'); }
Humsen/web/web-pc/WebContent/js/article/blog-details.js/0
{ "file_path": "Humsen/web/web-pc/WebContent/js/article/blog-details.js", "repo_id": "Humsen", "token_count": 598 }
54
/** * @author 何明胜 * * 2017年9月25日 */ (function(window, undefined) { /** * 创建元素节点并返回 */ function create(tagName, className, parent) { var element = document.createElement(tagName); element.className = className; parent.appendChild(element); return element; } /** * 数组消除重复 */ function clearRepeat(arr) { var obj = {}, result = []; for (var i = 0, len = arr.length; i < len; i++) { obj[arr[i]] = 1; } for ( var i in obj) { result.push(i); } return result; } /** * 添加类名 */ function addClassName(element, className) { var aClass = element.className.split(' '); aClass.push(className); aClass = clearRepeat(aClass); element.className = aClass.join(' '); } /** * 删除类名 */ function delClassName(element, className) { var aClass = element.className.split(' '), index = aClass .indexOf(className); if (index > 0) aClass.splice(index, 1); element.className = aClass.join(' '); } /** * 检查是否含有类名 * * @param element * @param className * @returns {boolean} */ function hasClassName(element, className) { var aClass = element.className.split(' '), index = aClass .indexOf(className); if (index > 0) return true; return false; } var Pager = function(obj) { this.__total = obj.total || 1; this.__index = obj.index || 1; this.__parent = obj.parent; this.__onchange = obj.onchange; // 初始化分页器 this.__init(obj); }; var pro = Pager.prototype; /** * 初始化分页器 */ pro.__init = function(obj) { if (this.__total < this.__index) return; // 存储数字 this.__numbers = []; // 储存省略号 this.__dots = []; this.__wrapper = create('div', 'pager-box', this.__parent); this.__body = create('div', 'pager', this.__wrapper); // 存储上一页 this.__preBtn = create('a', 'prev', this.__body); this.__preBtn.href = 'javascript:void(0);'; this.__preBtn.innerText = (obj.label && obj.label.prev) || '上一页'; // 存储数字 if (this.__total < 8) { for (var i = 0; i < this.__total; i++) { var t = create('a', 'number', this.__body); t.href = 'javascript:void(0);'; t.innerText = i + 1; this.__numbers.push(t); } } else { for (var i = 0; i < 2; i++) { var t = create('span', 'dots', this.__body); t.innerText = '...'; this.__dots.push(t); } ; for (var i = 0; i < 7; i++) { var t = create('a', 'number', this.__body); t.href = 'javascript:void(0);'; this.__numbers.push(t); } } // 存储下一页 this.__nextBtn = create('a', 'next', this.__body); this.__nextBtn.href = 'javascript:void(0);'; this.__nextBtn.innerText = (obj.label && obj.label.next) || '下一页'; // this._$setIndex(this.__index); // this.__body.onclick = this.__doClick.bind(this); }; pro.__doClick = function(e) { var e = e || window.event, target = e.target || e.srcElement; // 点击省略号 if (target.tagName.toLowerCase() == 'span') return; // 点击了不能点击的上一页或者下一页 if (hasClassName(target, 'js-disabled')) return; // 点击了当前页 if (hasClassName(target, 'js-selected')) return; if (target == this.__preBtn) { // 点击了上一页 this._$setIndex(this.__index - 1); } else if (target == this.__nextBtn) { // 点击了下一页 this._$setIndex(this.__index + 1); } else { // 点击了数字 var index = target.innerText; this._$setIndex(index); } }; /** * 跳转页数 */ pro._$setIndex = function(index) { index = parseInt(index); // 更新信息 if (index != this.__index) { this.__last = this.__index; this.__index = index; } // 处理 delClassName(this.__preBtn, 'js-disabled'); delClassName(this.__nextBtn, 'js-disabled'); if (this.__total < 8) { // 总页数小于8的情况 if (this.__last) delClassName(this.__numbers[this.__last - 1], 'js-selected'); addClassName(this.__numbers[this.__index - 1], 'js-selected'); if (this.__index == 1) addClassName(this.__preBtn, 'js-disabled'); if (this.__index == this.__total) addClassName(this.__nextBtn, 'js-disabled'); } else { this.__dots[0].style.display = 'none'; this.__dots[1].style.display = 'none'; for (var i = 0; i < 7; i++) { delClassName(this.__numbers[i], 'js-selected'); } ; if (this.__index < 5) { for (var i = 0; i < 6; i++) { this.__numbers[i].innerText = i + 1; } this.__numbers[6].innerText = this.__total; this.__dots[1].style.display = 'block'; this.__body.insertBefore(this.__dots[1], this.__numbers[6]); addClassName(this.__numbers[this.__index - 1], 'js-selected'); if (this.__index == 1) addClassName(this.__preBtn, 'js-disabled'); } else if (this.__index > this.__total - 4) { for (var i = 1; i < 7; i++) { this.__numbers[i].innerText = this.__total + i - 6; } this.__numbers[0].innerText = '1'; this.__dots[0].style.display = 'block'; this.__body.insertBefore(this.__dots[0], this.__numbers[1]); addClassName(this.__numbers[this.__index + 6 - this.__total], 'js-selected'); if (this.__index == this.__total) addClassName(this.__nextBtn, 'js-disabled'); } else { this.__numbers[0].innerText = '1'; for (var i = 1; i < 6; i++) { this.__numbers[i].innerText = this.__index - 3 + i; if (i == 3) addClassName(this.__numbers[i], 'js-selected'); } this.__numbers[6].innerText = this.__total; this.__dots[0].style.display = 'block'; this.__body.insertBefore(this.__dots[0], this.__numbers[1]); this.__dots[1].style.display = 'block'; this.__body.insertBefore(this.__dots[1], this.__numbers[6]); } } if (typeof this.__onchange == 'function') { this.__onchange({ index : this.__index, last : this.__last, total : this.__total }) } }; /** * 得到总页数 */ pro._$getIndex = function() { return this.__index; }; /** * 得到上一个页数 */ pro._$getLast = function() { return this.__last; }; // 变成全局 window.Pager = Pager; })(window); /*(function() { self.pager = new Pager({ index : 1, total : total, parent : self.pagerBox[0], onchange : self.doChangePage.bind(self), label : { prev : '<', next : '>' } }); });*/
Humsen/web/web-pc/WebContent/js/message/pager.js/0
{ "file_path": "Humsen/web/web-pc/WebContent/js/message/pager.js", "repo_id": "Humsen", "token_count": 3003 }
55
<!-- 此处修改记得更新 后端通用模板 --> <!-- 右侧固定栏 --> <link rel="stylesheet" href="/css/navigation/rightbar.css" /> <div id="bar_right"> <div> <div class="sidebar-module"> <h4>关于本站</h4> <p>&emsp;欢迎来到何明胜的个人网站.</p> <p>体验账户:husen,密码:admin123,登录可以看到后台菜单,并体检管理员权限,盼文明操作。此代码为初级Java web项目,已停止维护,仅供参考。</p> <p> 本站源码已托管github.欢迎访问:<br /> <a href="https://github.com/CrazyHusen/web" target="_blank">https://github.com/CrazyHusen/web</a> </p> <p> 交流答疑QQ群:805668552。 <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=41068b9adb14521cab1ebfea385e3e4aabf466115ba5278ca4d41a605506c096"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="点击加入:Java全栈开发学习交流" title="Java全栈开发学习交流"></a> </p> </div> <div class="sidebar-module"> <h4>我的其他主页</h4> <ol class="list-unstyled"> <li><a href="http://blog.csdn.net/qq_24879495" target="_blank">CSDN博客&emsp;一格的程序人生</a></li> <li><a href="https://github.com/CrazyHusen/" target="_blank">GitHub&emsp;何明胜</a></li> </ol> </div> </div> </div>
Humsen/web/web-pc/WebContent/module/navigation/rightbar.html/0
{ "file_path": "Humsen/web/web-pc/WebContent/module/navigation/rightbar.html", "repo_id": "Humsen", "token_count": 778 }
56
(function($) { /** * Default English package. It's included in the dist, so you do NOT need to include it to your head tag * The only reason I put it here is that you can clone it, and translate it into your language */ $.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, { base64: { 'default': 'Please enter a valid base 64 encoded' }, between: { 'default': 'Please enter a value between %s and %s', notInclusive: 'Please enter a value between %s and %s strictly' }, callback: { 'default': 'Please enter a valid value' }, choice: { 'default': 'Please enter a valid value', less: 'Please choose %s options at minimum', more: 'Please choose %s options at maximum', between: 'Please choose %s - %s options' }, color: { 'default': 'Please enter a valid color' }, creditCard: { 'default': 'Please enter a valid credit card number' }, cusip: { 'default': 'Please enter a valid CUSIP number' }, cvv: { 'default': 'Please enter a valid CVV number' }, date: { 'default': 'Please enter a valid date', min: 'Please enter a date after %s', max: 'Please enter a date before %s', range: 'Please enter a date in the range %s - %s' }, different: { 'default': 'Please enter a different value' }, digits: { 'default': 'Please enter only digits' }, ean: { 'default': 'Please enter a valid EAN number' }, emailAddress: { 'default': 'Please enter a valid email address' }, file: { 'default': 'Please choose a valid file' }, greaterThan: { 'default': 'Please enter a value greater than or equal to %s', notInclusive: 'Please enter a value greater than %s' }, grid: { 'default': 'Please enter a valid GRId number' }, hex: { 'default': 'Please enter a valid hexadecimal number' }, hexColor: { 'default': 'Please enter a valid hex color' }, iban: { 'default': 'Please enter a valid IBAN number', countryNotSupported: 'The country code %s is not supported', country: 'Please enter a valid IBAN number in %s', countries: { AD: 'Andorra', AE: 'United Arab Emirates', AL: 'Albania', AO: 'Angola', AT: 'Austria', AZ: 'Azerbaijan', BA: 'Bosnia and Herzegovina', BE: 'Belgium', BF: 'Burkina Faso', BG: 'Bulgaria', BH: 'Bahrain', BI: 'Burundi', BJ: 'Benin', BR: 'Brazil', CH: 'Switzerland', CI: 'Ivory Coast', CM: 'Cameroon', CR: 'Costa Rica', CV: 'Cape Verde', CY: 'Cyprus', CZ: 'Czech Republic', DE: 'Germany', DK: 'Denmark', DO: 'Dominican Republic', DZ: 'Algeria', EE: 'Estonia', ES: 'Spain', FI: 'Finland', FO: 'Faroe Islands', FR: 'France', GB: 'United Kingdom', GE: 'Georgia', GI: 'Gibraltar', GL: 'Greenland', GR: 'Greece', GT: 'Guatemala', HR: 'Croatia', HU: 'Hungary', IE: 'Ireland', IL: 'Israel', IR: 'Iran', IS: 'Iceland', IT: 'Italy', JO: 'Jordan', KW: 'Kuwait', KZ: 'Kazakhstan', LB: 'Lebanon', LI: 'Liechtenstein', LT: 'Lithuania', LU: 'Luxembourg', LV: 'Latvia', MC: 'Monaco', MD: 'Moldova', ME: 'Montenegro', MG: 'Madagascar', MK: 'Macedonia', ML: 'Mali', MR: 'Mauritania', MT: 'Malta', MU: 'Mauritius', MZ: 'Mozambique', NL: 'Netherlands', NO: 'Norway', PK: 'Pakistan', PL: 'Poland', PS: 'Palestine', PT: 'Portugal', QA: 'Qatar', RO: 'Romania', RS: 'Serbia', SA: 'Saudi Arabia', SE: 'Sweden', SI: 'Slovenia', SK: 'Slovakia', SM: 'San Marino', SN: 'Senegal', TN: 'Tunisia', TR: 'Turkey', VG: 'Virgin Islands, British' } }, id: { 'default': 'Please enter a valid identification number', countryNotSupported: 'The country code %s is not supported', country: 'Please enter a valid identification number in %s', countries: { BA: 'Bosnia and Herzegovina', BG: 'Bulgaria', BR: 'Brazil', CH: 'Switzerland', CL: 'Chile', CN: 'China', CZ: 'Czech Republic', DK: 'Denmark', EE: 'Estonia', ES: 'Spain', FI: 'Finland', HR: 'Croatia', IE: 'Ireland', IS: 'Iceland', LT: 'Lithuania', LV: 'Latvia', ME: 'Montenegro', MK: 'Macedonia', NL: 'Netherlands', RO: 'Romania', RS: 'Serbia', SE: 'Sweden', SI: 'Slovenia', SK: 'Slovakia', SM: 'San Marino', TH: 'Thailand', ZA: 'South Africa' } }, identical: { 'default': 'Please enter the same value' }, imei: { 'default': 'Please enter a valid IMEI number' }, imo: { 'default': 'Please enter a valid IMO number' }, integer: { 'default': 'Please enter a valid number' }, ip: { 'default': 'Please enter a valid IP address', ipv4: 'Please enter a valid IPv4 address', ipv6: 'Please enter a valid IPv6 address' }, isbn: { 'default': 'Please enter a valid ISBN number' }, isin: { 'default': 'Please enter a valid ISIN number' }, ismn: { 'default': 'Please enter a valid ISMN number' }, issn: { 'default': 'Please enter a valid ISSN number' }, lessThan: { 'default': 'Please enter a value less than or equal to %s', notInclusive: 'Please enter a value less than %s' }, mac: { 'default': 'Please enter a valid MAC address' }, meid: { 'default': 'Please enter a valid MEID number' }, notEmpty: { 'default': 'Please enter a value' }, numeric: { 'default': 'Please enter a valid float number' }, phone: { 'default': 'Please enter a valid phone number', countryNotSupported: 'The country code %s is not supported', country: 'Please enter a valid phone number in %s', countries: { BR: 'Brazil', CN: 'China', CZ: 'Czech Republic', DE: 'Germany', DK: 'Denmark', ES: 'Spain', FR: 'France', GB: 'United Kingdom', MA: 'Morocco', PK: 'Pakistan', RO: 'Romania', RU: 'Russia', SK: 'Slovakia', TH: 'Thailand', US: 'USA', VE: 'Venezuela' } }, regexp: { 'default': 'Please enter a value matching the pattern' }, remote: { 'default': 'Please enter a valid value' }, rtn: { 'default': 'Please enter a valid RTN number' }, sedol: { 'default': 'Please enter a valid SEDOL number' }, siren: { 'default': 'Please enter a valid SIREN number' }, siret: { 'default': 'Please enter a valid SIRET number' }, step: { 'default': 'Please enter a valid step of %s' }, stringCase: { 'default': 'Please enter only lowercase characters', upper: 'Please enter only uppercase characters' }, stringLength: { 'default': 'Please enter a value with valid length', less: 'Please enter less than %s characters', more: 'Please enter more than %s characters', between: 'Please enter value between %s and %s characters long' }, uri: { 'default': 'Please enter a valid URI' }, uuid: { 'default': 'Please enter a valid UUID number', version: 'Please enter a valid UUID version %s number' }, vat: { 'default': 'Please enter a valid VAT number', countryNotSupported: 'The country code %s is not supported', country: 'Please enter a valid VAT number in %s', countries: { AT: 'Austria', BE: 'Belgium', BG: 'Bulgaria', BR: 'Brazil', CH: 'Switzerland', CY: 'Cyprus', CZ: 'Czech Republic', DE: 'Germany', DK: 'Denmark', EE: 'Estonia', ES: 'Spain', FI: 'Finland', FR: 'France', GB: 'United Kingdom', GR: 'Greece', EL: 'Greece', HU: 'Hungary', HR: 'Croatia', IE: 'Ireland', IS: 'Iceland', IT: 'Italy', LT: 'Lithuania', LU: 'Luxembourg', LV: 'Latvia', MT: 'Malta', NL: 'Netherlands', NO: 'Norway', PL: 'Poland', PT: 'Portugal', RO: 'Romania', RU: 'Russia', RS: 'Serbia', SE: 'Sweden', SI: 'Slovenia', SK: 'Slovakia', VE: 'Venezuela', ZA: 'South Africa' } }, vin: { 'default': 'Please enter a valid VIN number' }, zipCode: { 'default': 'Please enter a valid postal code', countryNotSupported: 'The country code %s is not supported', country: 'Please enter a valid postal code in %s', countries: { AT: 'Austria', BR: 'Brazil', CA: 'Canada', CH: 'Switzerland', CZ: 'Czech Republic', DE: 'Germany', DK: 'Denmark', FR: 'France', GB: 'United Kingdom', IE: 'Ireland', IT: 'Italy', MA: 'Morocco', NL: 'Netherlands', PT: 'Portugal', RO: 'Romania', RU: 'Russia', SE: 'Sweden', SG: 'Singapore', SK: 'Slovakia', US: 'USA' } } }); }(window.jQuery));
Humsen/web/web-pc/WebContent/plugins/validator/js/language/en_US.js/0
{ "file_path": "Humsen/web/web-pc/WebContent/plugins/validator/js/language/en_US.js", "repo_id": "Humsen", "token_count": 7105 }
57
(function($) { /** * Romanian language package * Translated by @filipac */ $.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, { base64: { 'default': 'Te rog introdu un base64 valid' }, between: { 'default': 'Te rog introdu o valoare intre %s si %s', notInclusive: 'Te rog introdu o valoare doar intre %s si %s' }, callback: { 'default': 'Te rog introdu o valoare valida' }, choice: { 'default': 'Te rog introdu o valoare valida', less: 'Te rog alege minim %s optiuni', more: 'Te rog alege maxim %s optiuni', between: 'Te rog alege %s - %s optiuni' }, color: { 'default': 'Te rog sa introduci o culoare valida' }, creditCard: { 'default': 'Te rog introdu un numar de card valid' }, cusip: { 'default': 'Te rog introdu un numar CUSIP valid' }, cvv: { 'default': 'Te rog introdu un numar CVV valid' }, date: { 'default': 'Te rog introdu o data valida', min: 'Te rog sa introduci o data dupa %s', max: 'Te rog sa introduci o data inainte de %s', range: 'Te rog sa introduci o data in intervalul %s - %s' }, different: { 'default': 'Te rog sa introduci o valoare diferita' }, digits: { 'default': 'Te rog sa introduci doar cifre' }, ean: { 'default': 'Te rog sa introduci un numar EAN valid' }, emailAddress: { 'default': 'Te rog sa introduci o adresa de email valide' }, file: { 'default': 'Te rog sa introduci un fisier valid' }, greaterThan: { 'default': 'Te rog sa introduci o valoare mai mare sau egala cu %s', notInclusive: 'Te rog sa introduci o valoare mai mare ca %s' }, grid: { 'default': 'Te rog sa introduci un numar GRId valid' }, hex: { 'default': 'Te rog sa introduci un numar hexadecimal valid' }, hexColor: { 'default': 'Te rog sa introduci o culoare hex valida' }, iban: { 'default': 'Te rog sa introduci un IBAN valid', countryNotSupported: 'Tara %s nu este acceptata', country: 'Te rog sa introduci un IBAN valid din %s', countries: { AD: 'Andorra', AE: 'Emiratele Arabe unite', AL: 'Albania', AO: 'Angola', AT: 'Austria', AZ: 'Azerbaijan', BA: 'Bosnia si Herzegovina', BE: 'Belgia', BF: 'Burkina Faso', BG: 'Bulgaria', BH: 'Bahrain', BI: 'Burundi', BJ: 'Benin', BR: 'Brazilia', CH: 'Elvetia', CI: 'Coasta de Fildes', CM: 'Cameroon', CR: 'Costa Rica', CV: 'Cape Verde', CY: 'Cipru', CZ: 'Republica Cehia', DE: 'Germania', DK: 'Danemarca', DO: 'Republica Dominicană', DZ: 'Algeria', EE: 'Estonia', ES: 'Spania', FI: 'Finlanda', FO: 'Insulele Faroe', FR: 'Franta', GB: 'Regatul Unit', GE: 'Georgia', GI: 'Gibraltar', GL: 'Groenlanda', GR: 'Grecia', GT: 'Guatemala', HR: 'Croatia', HU: 'Ungaria', IE: 'Irlanda', IL: 'Israel', IR: 'Iran', IS: 'Islanda', IT: 'Italia', JO: 'Iordania', KW: 'Kuwait', KZ: 'Kazakhstan', LB: 'Lebanon', LI: 'Liechtenstein', LT: 'Lithuania', LU: 'Luxembourg', LV: 'Latvia', MC: 'Monaco', MD: 'Moldova', ME: 'Muntenegru', MG: 'Madagascar', MK: 'Macedonia', ML: 'Mali', MR: 'Mauritania', MT: 'Malta', MU: 'Mauritius', MZ: 'Mozambique', NL: 'Olanda', NO: 'Norvegia', PK: 'Pakistan', PL: 'Polanda', PS: 'Palestina', PT: 'Portugalia', QA: 'Qatar', RO: 'Romania', RS: 'Serbia', SA: 'Arabia Saudita', SE: 'Suedia', SI: 'Slovenia', SK: 'Slovacia', SM: 'San Marino', SN: 'Senegal', TN: 'Tunisia', TR: 'Turkey', VG: 'Insulele Virgin' } }, id: { 'default': 'Te rog sa introduci un numar de identificare valid', countryNotSupported: 'Codul %s nu este suportat', country: 'Te rog sa introduci un numar de identificare valid din %s', countries: { BA: 'Bosnia si Herzegovina', BG: 'Bulgaria', BR: 'Brazilia', CH: 'Elvetia', CL: 'Chile', CN: 'China', CZ: 'Republica Cehia', DK: 'Danemarca', EE: 'Estonia', ES: 'Spania', FI: 'Finlanda', HR: 'Croatia', IE: 'Irlanda', IS: 'Islanda', LT: 'Lithuania', LV: 'Latvia', ME: 'Muntenegru', MK: 'Macedonia', NL: 'Olanda', RO: 'Romania', RS: 'Serbia', SE: 'Suedia', SI: 'Slovenia', SK: 'Slovacia', SM: 'San Marino', TH: 'Thailanda', ZA: 'Africa de Sud' } }, identical: { 'default': 'Te rog sa introduci aceeasi valoare' }, imei: { 'default': 'Te rog sa introduci un numar IMEI valid' }, imo: { 'default': 'Te rog sa introduci un numar IMO valid' }, integer: { 'default': 'Te rog sa introduci un numar valid' }, ip: { 'default': 'Te rog sa introduci o adresa IP valida', ipv4: 'Te rog sa introduci o adresa IPv4 valida', ipv6: 'Te rog sa introduci o adresa IPv6 valida' }, isbn: { 'default': 'Te rog sa introduci un numar ISBN valid' }, isin: { 'default': 'Te rog sa introduci un numar ISIN valid' }, ismn: { 'default': 'Te rog sa introduci un numar ISMN valid' }, issn: { 'default': 'Te rog sa introduci un numar ISSN valid' }, lessThan: { 'default': 'Te rog sa introduci o valoare mai mica sau egala cu %s', notInclusive: 'Te rog sa introduci o valoare mai mica decat %s' }, mac: { 'default': 'Te rog sa introduci o adresa MAC valida' }, meid: { 'default': 'Te rog sa introduci un numar MEID valid' }, notEmpty: { 'default': 'Te rog sa introduci o valoare' }, numeric: { 'default': 'Te rog sa introduci un numar' }, phone: { 'default': 'Te rog sa introduci un numar de telefon valid', countryNotSupported: 'Prefixul %s nu este suportat', country: 'Te rog sa introduci un numar de telefon valid din %s', countries: { BR: 'Brazilia', CN: 'China', CZ: 'Republica Cehia', DE: 'Germania', DK: 'Danemarca', ES: 'Spania', FR: 'Franta', GB: 'Regatul Unit', MA: 'Maroc', PK: 'Pakistan', RO: 'Romania', RU: 'Rusia', SK: 'Slovacia', TH: 'Thailanda', US: 'SUA', VE: 'Venezuela' } }, regexp: { 'default': 'Te rog sa introduci o valoare in formatul' }, remote: { 'default': 'Te rog sa introduci o valoare valida' }, rtn: { 'default': 'Te rog sa introduci un numar RTN valid' }, sedol: { 'default': 'Te rog sa introduci un numar SEDOL valid' }, siren: { 'default': 'Te rog sa introduci un numar SIREN valid' }, siret: { 'default': 'Te rog sa introduci un numar SIRET valid' }, step: { 'default': 'Te rog introdu un pas de %s' }, stringCase: { 'default': 'Te rog sa introduci doar litere mici', upper: 'Te rog sa introduci doar litere mari' }, stringLength: { 'default': 'Te rog sa introduci o valoare cu lungimea valida', less: 'Te rog sa introduci mai putin de %s caractere', more: 'Te rog sa introduci mai mult de %s caractere', between: 'Te rog sa introduci o valoare cu lungimea intre %s si %s caractere' }, uri: { 'default': 'Te rog sa introduci un URI valid' }, uuid: { 'default': 'Te rog sa introduci un numar UUID valid', version: 'Te rog sa introduci un numar UUID versiunea %s valid' }, vat: { 'default': 'Te rog sa introduci un numar TVA valid', countryNotSupported: 'Tara %s nu este acceptata', country: 'Te rog sa introduci un numar TVA valid din %s', countries: { AT: 'Austria', BE: 'Belgia', BG: 'Bulgaria', BR: 'Brazilia', CH: 'Elvetia', CY: 'Cipru', CZ: 'Republica Cehia', DE: 'Germania', DK: 'Danemarca', EE: 'Estonia', ES: 'Spania', FI: 'Finlanda', FR: 'Franta', GB: 'Regatul Unit', GR: 'Grecia', EL: 'Grecia', HU: 'Ungaria', HR: 'Croatia', IE: 'Irlanda', IS: 'Islanda', IT: 'Italia', LT: 'Lituania', LU: 'Luxemburg', LV: 'Latvia', MT: 'Malta', NL: 'Olanda', NO: 'Norvegia', PL: 'Polanda', PT: 'Portugalia', RO: 'Romania', RU: 'Rusia', RS: 'Serbia', SE: 'Suedia', SI: 'Slovenia', SK: 'Slovacia', VE: 'Venezuela', ZA: 'Africa de Sud' } }, vin: { 'default': 'Te rog sa introduci un numar VIN valid' }, zipCode: { 'default': 'Te rog sa introduci un cod postal valid', countryNotSupported: 'Tara %s nu este acceptata', country: 'Te rog sa introduci un cod postal valid din %s', countries: { AT: 'Austria', BR: 'Brazilia', CA: 'Canada', CH: 'Elvetia', CZ: 'Republica Cehia', DE: 'Germania', DK: 'Danemarca', FR: 'Franta', GB: 'Regatul Unit', IE: 'Irlanda', IT: 'Italia', MA: 'Maroc', NL: 'Olanda', PT: 'Portugalia', RO: 'Romania', RU: 'Rusia', SE: 'Suedia', SG: 'Singapore', SK: 'Slovacia', US: 'SUA' } } }); }(window.jQuery));
Humsen/web/web-pc/WebContent/plugins/validator/js/language/ro_RO.js/0
{ "file_path": "Humsen/web/web-pc/WebContent/plugins/validator/js/language/ro_RO.js", "repo_id": "Humsen", "token_count": 7520 }
58
<!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> <!-- editor.md --> <link rel="stylesheet" href="/plugins/editormd/css/editormd.preview.min.css" /> <link rel="stylesheet" href="/plugins/editormd/css/editormd.min.css" /> <!-- editor.md --> <script src="/plugins/editormd/lib/marked.min.js"></script> <script src="/plugins/editormd/lib/prettify.min.js"></script> <script src="/plugins/editormd/js/editormd.min.js"></script> <!-- 自定义CSS --> <link rel="stylesheet" href="/css/article/article.css"> <!-- 自定义脚本 --> <script src="/js/article/code-library.js"></script> <script src="/js/pagination.js"></script> </head> <body> <input id="menuBarNo" type="hidden" value="2" /> <div id="fh5co-page"> <!-- 左侧导航 --> <!-- 中间内容 --> <div id="fh5co-main"> <div id="list_code" class="fh5co-post"> <!-- js脚本动态添加内容 --> </div> </div> <!-- 右侧导航 --> </div> </body> </html>
Humsen/web/web-pc/WebContent/topic/code/code.html/0
{ "file_path": "Humsen/web/web-pc/WebContent/topic/code/code.html", "repo_id": "Humsen", "token_count": 794 }
59
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <https://www.gnu.org/licenses/>.
OCA/web/LICENSE/0
{ "file_path": "OCA/web/LICENSE", "repo_id": "OCA", "token_count": 7889 }
60
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_advanced_search_x2x # # 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:49+0000\n" "PO-Revision-Date: 2023-09-02 20:35+0000\n" "Last-Translator: Ivorra78 <informatica@totmaterial.es>\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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 4.17\n" #. module: web_advanced_search #. odoo-javascript #: code:addons/web_advanced_search/static/src/js/utils.esm.js:0 #, python-format msgid " and " msgstr " y " #. module: web_advanced_search #. odoo-javascript #: code:addons/web_advanced_search/static/src/js/utils.esm.js:0 #, python-format msgid " is not " msgstr " no es " #. module: web_advanced_search #. odoo-javascript #: code:addons/web_advanced_search/static/src/js/utils.esm.js:0 #, python-format msgid " or " msgstr " o " #. 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 "Añadir un Filtro Avanzado" #~ msgid "is in selection" #~ msgstr "está en la selección"
OCA/web/web_advanced_search/i18n/es.po/0
{ "file_path": "OCA/web/web_advanced_search/i18n/es.po", "repo_id": "OCA", "token_count": 597 }
61
from odoo.tools import config from . import models if not config.get("without_demo"): from . import demo
OCA/web/web_apply_field_style/__init__.py/0
{ "file_path": "OCA/web/web_apply_field_style/__init__.py", "repo_id": "OCA", "token_count": 36 }
62
# © 2023 David BEAL @ Akretion # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.exceptions import ValidationError from odoo.tests import common class Test(common.TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) cls.user_view = cls.env.ref("base.view_users_form") def test_nice(self): arch, view = ( self.env["res.users"] .with_context(style="nice") ._get_view(view_id=self.user_view.id) ) for field in arch.xpath("//field[@name='partner_id']"): self.assertEqual(field.attrib.get("class"), "bg-warning") def test_no_dict(self): with self.assertRaisesRegex(ValidationError, "_get_field_styles().*"): arch, view = ( self.env["res.users"] .with_context(style="no_dict") ._get_view(view_id=self.user_view.id) ) def test_no_field_list(self): with self.assertRaisesRegex(ValidationError, ".*should be a list of fields.*"): arch, view = ( self.env["res.users"] .with_context(style="no_field_list") ._get_view(view_id=self.user_view.id) ) def test_empty_dict(self): # No effect but no broken code arch, view = ( self.env["res.users"] .with_context(style="empty_dict") ._get_view(view_id=self.user_view.id) ) def test_no_style(self): with self.assertRaisesRegex(ValidationError, ".*should be a dict.*"): arch, view = ( self.env["res.users"] .with_context(style="no_style") ._get_view(view_id=self.user_view.id) )
OCA/web/web_apply_field_style/tests/test_module.py/0
{ "file_path": "OCA/web/web_apply_field_style/tests/test_module.py", "repo_id": "OCA", "token_count": 931 }
63
/** @odoo-module **/ /* Copyright 2023 Tecnativa - Stefan Ungureanu * License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ import {CalendarModel} from "@web/views/calendar/calendar_model"; import {patch} from "@web/core/utils/patch"; patch(CalendarModel.prototype, "WebCalendarSlotDurationCalendarModel", { buildRawRecord(partialRecord, options = {}) { if ( !partialRecord.end && this.env.searchModel.context.calendar_slot_duration && !partialRecord.isAllDay ) { const slot_duration = this.env.searchModel.context.calendar_slot_duration; const [hours, minutes, seconds] = slot_duration .match(/(\d+):(\d+):(\d+)/) .slice(1, 4); const durationFloat = hours + minutes / 60 + seconds / 3600; partialRecord.end = partialRecord.start.plus({hours: durationFloat}); } return this._super(partialRecord, options); }, });
OCA/web/web_calendar_slot_duration/static/src/js/calendar_model.esm.js/0
{ "file_path": "OCA/web/web_calendar_slot_duration/static/src/js/calendar_model.esm.js", "repo_id": "OCA", "token_count": 412 }
64
* Hynsys Technologies <hynsystechnologies@gmail.com> * Juan Miguel Sánchez Arce <juan.sanchez@camptocamp.com> * `Camptocamp <https://www.camptocamp.com>`_ * Iván Todorovich <ivan.todorovich@camptocamp.com>
OCA/web/web_chatter_position/readme/CONTRIBUTORS.rst/0
{ "file_path": "OCA/web/web_chatter_position/readme/CONTRIBUTORS.rst", "repo_id": "OCA", "token_count": 81 }
65
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_company_color # msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2019-11-18 14:34+0000\n" "Last-Translator: Bole <bole@dajmi5.com>\n" "Language-Team: none\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_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 "" #. 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 "Tvrtke" #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__company_colors msgid "Company Colors" msgstr "Boje tvrtke" #. module: web_company_color #: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form msgid "Company Styles" msgstr "Stilovi tvrtke" #. module: web_company_color #: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form msgid "Compute colors from logo" msgstr "" #. 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 "Boja pozadine Navigacijske trake" #. 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 "Poja pozadine navigacijske trake (hoover)" #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_text msgid "Navbar Text Color" msgstr "Boja teksta navigacijske trake" #. module: web_company_color #: model:ir.model,name:web_company_color.model_ir_qweb msgid "Qweb" msgstr "" #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" msgstr "SCSS Modif. Vremenski žig" #~ msgid "Navbar Colors" #~ msgstr "Boje navigacijske trake" #~ 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" #~ " Kako bi promjene postale vidljive, molimo \n" #~ " učitajte ponovo ovu stranicu."
OCA/web/web_company_color/i18n/hr.po/0
{ "file_path": "OCA/web/web_company_color/i18n/hr.po", "repo_id": "OCA", "token_count": 1539 }
66
from . import test_res_company
OCA/web/web_company_color/tests/__init__.py/0
{ "file_path": "OCA/web/web_company_color/tests/__init__.py", "repo_id": "OCA", "token_count": 9 }
67
/** @odoo-module **/ import {patch} from "web.utils"; import {ConfirmationDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; import {_t} from "@web/core/l10n/translation"; import {FormController} from "@web/views/form/form_controller"; patch(FormController.prototype, "DuplicateConfirmation", { async duplicateRecord() { var _super = this._super; await this.dialogService.add(ConfirmationDialog, { title: _t("Duplicate"), body: _t("Are you sure that you would like to copy this record?"), confirm: () => { _super.apply(this, arguments); }, cancel: () => { // `ConfirmationDialog` needs this prop to display the cancel // button but we do nothing on cancel. }, }); }, });
OCA/web/web_copy_confirm/static/src/js/web_copy_confirm.esm.js/0
{ "file_path": "OCA/web/web_copy_confirm/static/src/js/web_copy_confirm.esm.js", "repo_id": "OCA", "token_count": 352 }
68
* Florian Kantelberg <florian.kantelberg@initos.com>
OCA/web/web_dark_mode/readme/CONTRIBUTORS.rst/0
{ "file_path": "OCA/web/web_dark_mode/readme/CONTRIBUTORS.rst", "repo_id": "OCA", "token_count": 21 }
69
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_dashboard_tile # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2024-02-02 15:33+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_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__action_id msgid "Action" msgstr "Azione" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__active #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__active msgid "Active" msgstr "Attiva" #. module: web_dashboard_tile #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_category_form msgid "Archived" msgstr "In archivio" #. module: web_dashboard_tile #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__primary_function__avg #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__secondary_function__avg msgid "Average" msgstr "Media" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Average value of '%s'" msgstr "Valore medio di '%s'" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__background_color msgid "Background Color" msgstr "Colore sfondo" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__category_id msgid "Category" msgstr "Categoria" #. module: web_dashboard_tile #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__primary_function__count #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__secondary_function__count msgid "Count" msgstr "Conteggio" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__create_uid #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__create_uid msgid "Created by" msgstr "Creato da" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__create_date #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__create_date msgid "Created on" msgstr "Creato il" #. module: web_dashboard_tile #: model:ir.actions.act_window,name:web_dashboard_tile.action_tile_category #: model:ir.ui.menu,name:web_dashboard_tile.menu_tile_category msgid "Dashboard Categories" msgstr "Categorie cruscotto" #. module: web_dashboard_tile #: model:ir.actions.act_window,name:web_dashboard_tile.action_category_2_tile #: model:ir.actions.act_window,name:web_dashboard_tile.action_tile_tile #: model:ir.ui.menu,name:web_dashboard_tile.menu_tile_tile msgid "Dashboard Items" msgstr "Elementi cruscotto" #. module: web_dashboard_tile #: model:ir.model,name:web_dashboard_tile.model_tile_tile msgid "Dashboard Tile" msgstr "Area cruscotto" #. module: web_dashboard_tile #: model:ir.model,name:web_dashboard_tile.model_tile_category msgid "Dashboard Tile Category" msgstr "Categoria area cruscotto" #. module: web_dashboard_tile #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_tile_form msgid "Display" msgstr "Visualizza" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__display_name #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__display_name msgid "Display Name" msgstr "Nome visualizzato" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__domain msgid "Domain" msgstr "Dominio" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__domain_error #, python-format msgid "Domain Error" msgstr "Errore dominio" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Error" msgstr "Errore" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__font_color msgid "Font Color" msgstr "Colore del carattere" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__group_ids msgid "Groups" msgstr "Gruppi" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__hidden msgid "Hidden" msgstr "Nascosto" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__hide_if_null msgid "Hide if null" msgstr "Nascondere se nullo" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__id #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__id msgid "ID" msgstr "ID" #. module: web_dashboard_tile #: model:ir.model.fields,help:web_dashboard_tile.field_tile_tile__hide_if_null msgid "If checked, the item will be hidden if the primary value is null." msgstr "" "Se selezionata, l'elemento verrà nascosto se il valore principale è nullo." #. module: web_dashboard_tile #: model:ir.model.fields,help:web_dashboard_tile.field_tile_tile__group_ids msgid "" "If this field is set, only users of this group can view this tile. Please " "note that it will only work for global tiles (that is, when User field is " "left empty)" msgstr "" "Se questo campo è impostato, solo gli utenti di questo gruppo possono vedere " "questa area. Notare che funzionerà solo per aree globali (ovvero quando il " "campo utente è vuoto)" #. module: web_dashboard_tile #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_category_form msgid "Items" msgstr "Elementi" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category____last_update #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile____last_update msgid "Last Modified on" msgstr "Ultima modifica il" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__write_uid #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__write_uid msgid "Last Updated by" msgstr "Ultimo aggiornamento di" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__write_date #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__write_date msgid "Last Updated on" msgstr "Ultimo aggiornamento il" #. module: web_dashboard_tile #: model:ir.model.fields,help:web_dashboard_tile.field_tile_tile__action_id msgid "Let empty to use the default action related to the selected model." msgstr "" "Lasciare vuoto per utilizzare l'azione predefinita collegata al modello " "selezionato." #. module: web_dashboard_tile #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_tile_form msgid "Main Value" msgstr "Valore principale" #. module: web_dashboard_tile #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__primary_function__max #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__secondary_function__max msgid "Maximum" msgstr "Massimo" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Maximum value of '%s'" msgstr "Valore massimo di '%s'" #. module: web_dashboard_tile #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__primary_function__median #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__secondary_function__median msgid "Median" msgstr "Mediana" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Median value of '%s'" msgstr "Valore mediano di '%s'" #. module: web_dashboard_tile #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__primary_function__min #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__secondary_function__min msgid "Minimum" msgstr "Minimo" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Minimum value of '%s'" msgstr "Valore minimo di '%s'" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__model_id msgid "Model" msgstr "Modello" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__model_name msgid "Model name" msgstr "Nome modello" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__name #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__name msgid "Name" msgstr "Nome" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Number of records" msgstr "Numero di record" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__action_id msgid "Odoo Action" msgstr "Azione Odoo" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__menu_id msgid "Odoo Menu" msgstr "Menu Odoo" #. module: web_dashboard_tile #: model:ir.ui.menu,name:web_dashboard_tile.menu_dashboard_tile msgid "Overview" msgstr "Panoramica" #. module: web_dashboard_tile #: model:ir.ui.menu,name:web_dashboard_tile.menu_tile_configuration msgid "Overview Settings" msgstr "Impostazioni panoramica" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Please select a field from the selected model." msgstr "Selezionare un campo dal modello selezionato." #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__primary_error msgid "Primary Error" msgstr "Errore principale" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__primary_field_id msgid "Primary Field" msgstr "Campo principale" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__primary_format msgid "Primary Format" msgstr "Formato principale" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__primary_formated_value msgid "Primary Formated Value" msgstr "Valore formattato principale" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__primary_function msgid "Primary Function" msgstr "Funzione principale" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__primary_helper msgid "Primary Helper" msgstr "Aiuto principale" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__primary_value msgid "Primary Value" msgstr "Valore principale" #. module: web_dashboard_tile #: model:ir.model.fields,help:web_dashboard_tile.field_tile_tile__primary_format #: model:ir.model.fields,help:web_dashboard_tile.field_tile_tile__secondary_format msgid "" "Python Format String valid with str.format()\n" "ie: '{:,} Kgs' will output '1,000 Kgs' if value is 1000." msgstr "" "Stringa formato Python valida con str.format()\n" "es. '{:,} Kgs' restituirà '1,000 Kgs' se il valore è 1000." #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__secondary_error msgid "Secondary Error" msgstr "Errore secondario" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__secondary_field_id msgid "Secondary Field" msgstr "Campo secondario" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__secondary_format msgid "Secondary Format" msgstr "Formato secondario" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__secondary_formated_value msgid "Secondary Formated Value" msgstr "Valore formattato secondario" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__secondary_function msgid "Secondary Function" msgstr "Funzione secondaria" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__secondary_helper msgid "Secondary Helper" msgstr "Aiuto secondario" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__secondary_value #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_tile_form msgid "Secondary Value" msgstr "Valore secondario" #. module: web_dashboard_tile #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_tile_form msgid "Security" msgstr "Sicurezza" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__sequence #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__sequence msgid "Sequence" msgstr "Sequenza" #. module: web_dashboard_tile #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_tile_form msgid "Settings" msgstr "Impostazioni" #. module: web_dashboard_tile #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__primary_function__sum #: model:ir.model.fields.selection,name:web_dashboard_tile.selection__tile_tile__secondary_function__sum msgid "Sum" msgstr "Somma" #. module: web_dashboard_tile #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_category_form #: model_terms:ir.ui.view,arch_db:web_dashboard_tile.view_tile_tile_form msgid "Technical Informations" msgstr "Informazioni tecniche" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__tile_ids msgid "Tiles" msgstr "Aree" #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_category__tile_qty msgid "Tiles Quantity" msgstr "Quantità aree" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Total value of '%s'" msgstr "Valore totale di '%s'" #. module: web_dashboard_tile #. odoo-python #: code:addons/web_dashboard_tile/models/tile_tile.py:0 #, python-format msgid "Unimplemented Feature. Search on Active field disabled." msgstr "" "Funzionalità non implementata. La ricerca ni campi attivi è disabilitata." #. module: web_dashboard_tile #: model:ir.model.fields,field_description:web_dashboard_tile.field_tile_tile__user_id msgid "User" msgstr "Utente"
OCA/web/web_dashboard_tile/i18n/it.po/0
{ "file_path": "OCA/web/web_dashboard_tile/i18n/it.po", "repo_id": "OCA", "token_count": 5570 }
70
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_dialog_size # msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2021-05-17 20:47+0000\n" "Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\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.3.2\n" #. module: web_dialog_size #: model:ir.model,name:web_dialog_size.model_ir_config_parameter msgid "System Parameter" msgstr "Systeem Parameter" #~ msgid "Display Name" #~ msgstr "Weergavenaam" #~ msgid "ID" #~ msgstr "ID" #~ msgid "Last Modified on" #~ msgstr "Laatst Gewijzigd op"
OCA/web/web_dialog_size/i18n/nl.po/0
{ "file_path": "OCA/web/web_dialog_size/i18n/nl.po", "repo_id": "OCA", "token_count": 366 }
71
<?xml version="1.0" encoding="utf-8" ?> <templates> <t t-name="web_dialog_size.ExpandButton" owl="1"> <button t-if="props.getsize() == 'dialog_full_screen'" type="button" class="btn btn-secondary dialog_button_extend" t-on-click="dialog_button_restore" > <i class="fa fa-compress" /> </button> <button t-if="props.getsize() != 'dialog_full_screen'" type="button" class="btn btn-secondary dialog_button_restore" t-on-click="dialog_button_extend" > <i class="fa fa-expand" /> </button> </t> </templates>
OCA/web/web_dialog_size/static/src/xml/ExpandButton.xml/0
{ "file_path": "OCA/web/web_dialog_size/static/src/xml/ExpandButton.xml", "repo_id": "OCA", "token_count": 363 }
72
Enable the group *Direct Export* to the users who are allowed to make use of the option 'Export xlsx' from the list view.
OCA/web/web_disable_export_group/readme/CONFIGURE.rst/0
{ "file_path": "OCA/web/web_disable_export_group/readme/CONFIGURE.rst", "repo_id": "OCA", "token_count": 32 }
73
# Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Web Domain Field", "summary": """ Use computed field as domain""", "version": "16.0.1.0.1", "license": "AGPL-3", "author": "ACSONE SA/NV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "depends": ["web"], "data": [], "assets": { "web.assets_backend": [ "/web_domain_field/static/lib/js/*.js", ], "web.qunit_suite_tests": [ "/web_domain_field/static/tests/**/*.js", ], }, "installable": True, }
OCA/web/web_domain_field/__manifest__.py/0
{ "file_path": "OCA/web/web_domain_field/__manifest__.py", "repo_id": "OCA", "token_count": 303 }
74
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_environment_ribbon # msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2020-02-02 22:13+0000\n" "Last-Translator: eduardgm <eduard.garcia@qubiq.es>\n" "Language-Team: none\n" "Language: ca\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.10\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 "Nom mostrat" #~ msgid "ID" #~ msgstr "ID" #~ msgid "Last Modified on" #~ msgstr "Última modificació el"
OCA/web/web_environment_ribbon/i18n/ca.po/0
{ "file_path": "OCA/web/web_environment_ribbon/i18n/ca.po", "repo_id": "OCA", "token_count": 352 }
75
* You can change the ribbon's name ("TEST") by editing the default system parameter "ribbon.name" (in the menu Settings > Parameters > System Parameters) To hide the ribbon, set this parameter to "False" or delete it. * You can customize the ribbon color and background color through system parameters: "ribbon.color", "ribbon.background.color". Fill with valid CSS colors or just set to "False" to use default values. * You can add the database name in the ribbon by adding "{db_name}" in the system parameter "ribbon.name".
OCA/web/web_environment_ribbon/readme/CONFIGURE.rst/0
{ "file_path": "OCA/web/web_environment_ribbon/readme/CONFIGURE.rst", "repo_id": "OCA", "token_count": 136 }
76
* Lucas Perais (lpe) <lpe@odoo.com> contributed the original code to Odoo. * Stefan Rijnhart <stefan@opener.amsterdam> created the backport to Odoo 16 in this module.
OCA/web/web_field_numeric_formatting/readme/CONTRIBUTORS.rst/0
{ "file_path": "OCA/web/web_field_numeric_formatting/readme/CONTRIBUTORS.rst", "repo_id": "OCA", "token_count": 57 }
77
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_group_expand # msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-10-28 16:10+0000\n" "Last-Translator: Adriano Prado <adrianojprado@gmail.com>\n" "Language-Team: none\n" "Language: pt_BR\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_group_expand #. odoo-javascript #: code:addons/web_group_expand/static/src/xml/list_controller.xml:0 #, python-format msgid "Compress" msgstr "Comprimir" #. module: web_group_expand #. odoo-javascript #: code:addons/web_group_expand/static/src/xml/list_controller.xml:0 #, python-format msgid "Expand" msgstr "Expandir" #, python-format #~ msgid "Collapse groups" #~ msgstr "Recolher grupos" #, python-format #~ msgid "Expand groups" #~ msgstr "Expandir grupos"
OCA/web/web_group_expand/i18n/pt_BR.po/0
{ "file_path": "OCA/web/web_group_expand/i18n/pt_BR.po", "repo_id": "OCA", "token_count": 417 }
78
This module introduces a new way to guide the user through Odoo. This module is created because **the standard Odoo tours:** #. forces the user to create records; #. cannot be reopened; #. is only available for the admin user; #. the bubbles are not obvious.
OCA/web/web_help/readme/DESCRIPTION.rst/0
{ "file_path": "OCA/web/web_help/readme/DESCRIPTION.rst", "repo_id": "OCA", "token_count": 67 }
79
<?xml version="1.0" encoding="UTF-8" ?> <templates> <t t-name="web_help.TripStep" owl="1"> <div> <div class="pb-4"> <t t-out="content" /> </div> <button class="btn btn-lg btn-outline-light web_help_cb_button mr8"><t t-esc="cbBtnText" /></button> <button class="btn btn-lg btn-outline-light web_help_close pull-right"><t t-esc="closeBtnText" /></button> </div> </t> <t t-name="web_help.TripStepLast" owl="1"> <div> <div class="pb-4"> <t t-out="content" /> </div> <button class="btn btn-lg btn-outline-light web_help_cb_button"><t t-esc="cbBtnText" /></button> </div> </t> </templates>
OCA/web/web_help/static/src/trip.xml/0
{ "file_path": "OCA/web/web_help/static/src/trip.xml", "repo_id": "OCA", "token_count": 515 }
80
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_multi # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-11-27 11: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_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__help msgid "Action Description" msgstr "Descrizione azione" #. module: web_ir_actions_act_multi #: model:ir.model,name:web_ir_actions_act_multi.model_ir_actions_act_multi msgid "Action Mulit" msgstr "Azione multi" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__name msgid "Action Name" msgstr "Nome azione" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__type msgid "Action Type" msgstr "Tipo azione" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__binding_model_id msgid "Binding Model" msgstr "Modello collegamento" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__binding_type msgid "Binding Type" msgstr "Tipo collegamento" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__binding_view_types msgid "Binding View Types" msgstr "Tipi vista collegamento" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__create_uid msgid "Created by" msgstr "Creato da" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__create_date msgid "Created on" msgstr "Creato il" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__display_name msgid "Display Name" msgstr "Nome visualizzato" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__xml_id msgid "External ID" msgstr "ID esterno" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id msgid "ID" msgstr "ID" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi____last_update msgid "Last Modified on" msgstr "Ultima modifica il" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__write_uid msgid "Last Updated by" msgstr "Ultimo aggiornamento di" #. module: web_ir_actions_act_multi #: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__write_date msgid "Last Updated on" msgstr "Ultimo aggiornamento il" #. module: web_ir_actions_act_multi #: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help msgid "" "Optional help text for the users with a description of the target view, such" " as its usage and purpose." msgstr "" "Testo di aiuto opzionale per l'utente con una descrizione della vista " "obiettivo, come il suo utilizzo e obiettivo." #. module: web_ir_actions_act_multi #: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__binding_model_id msgid "" "Setting a value makes this action available in the sidebar for the given " "model." msgstr "" "Impostare un valore rende questa azione disponibile nella barra laterale per " "il dato modello."
OCA/web/web_ir_actions_act_multi/i18n/it.po/0
{ "file_path": "OCA/web/web_ir_actions_act_multi/i18n/it.po", "repo_id": "OCA", "token_count": 1514 }
81
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message # # 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: 2017-06-02 09:52+0000\n" "PO-Revision-Date: 2017-06-02 09:52+0000\n" "Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "Language: de\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_ir_actions_act_window_message #. openerp-web #: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 #, python-format msgid "Close" msgstr "Schließen"
OCA/web/web_ir_actions_act_window_message/i18n/de.po/0
{ "file_path": "OCA/web/web_ir_actions_act_window_message/i18n/de.po", "repo_id": "OCA", "token_count": 363 }
82
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class IrActionsActWindowMessage(models.Model): _name = "ir.actions.act_window.message" _description = "Action Window Message" _inherit = "ir.actions.actions" _table = "ir_actions" type = fields.Char(default="ir.actions.act_window.message") def _get_readable_fields(self): return super()._get_readable_fields() | { "title", "buttons", "close_button_title", "message", "is_html_message", }
OCA/web/web_ir_actions_act_window_message/models/ir_actions.py/0
{ "file_path": "OCA/web/web_ir_actions_act_window_message/models/ir_actions.py", "repo_id": "OCA", "token_count": 248 }
83
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_page # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-11-27 11: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_ir_actions_act_window_page #: model:ir.model,name:web_ir_actions_act_window_page.model_ir_actions_act_window_page_next msgid "Action to page to the next record from a form view button" msgstr "Azione per passare al record successivo da un pulsante vista" #. module: web_ir_actions_act_window_page #: model:ir.model,name:web_ir_actions_act_window_page.model_ir_actions_act_window_page_prev msgid "Action to page to the previous record from a form view button" msgstr "Azione per passare al record precedente da un pulsante vista" #. module: web_ir_actions_act_window_page #: model:ir.model,name:web_ir_actions_act_window_page.model_ir_actions_act_window_page_list msgid "Action to switch to the list view" msgstr "Azione per passare alla vista elenco" #. module: web_ir_actions_act_window_page #: model_terms:ir.ui.view,arch_db:web_ir_actions_act_window_page.view_partner_form msgid "Next Partner" msgstr "Partner successivo" #. module: web_ir_actions_act_window_page #: model:ir.actions.server,name:web_ir_actions_act_window_page.demo_pager_next msgid "Next partner" msgstr "Partner successivo" #. module: web_ir_actions_act_window_page #: model_terms:ir.ui.view,arch_db:web_ir_actions_act_window_page.view_partner_form msgid "Previous Partner" msgstr "Partner precedente" #. module: web_ir_actions_act_window_page #: model:ir.actions.server,name:web_ir_actions_act_window_page.demo_pager_previous msgid "Previous partner" msgstr "Partner precedente"
OCA/web/web_ir_actions_act_window_page/i18n/it.po/0
{ "file_path": "OCA/web/web_ir_actions_act_window_page/i18n/it.po", "repo_id": "OCA", "token_count": 758 }
84
The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp
OCA/web/web_m2x_options/readme/CREDITS.rst/0
{ "file_path": "OCA/web/web_m2x_options/readme/CREDITS.rst", "repo_id": "OCA", "token_count": 21 }
85
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_notify # msgid "" msgstr "" "Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-09-21 15:40+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_notify #. odoo-python #: code:addons/web_notify/models/res_users.py:0 #, python-format msgid "Danger" msgstr "Pericolo" #. module: web_notify #. odoo-python #: code:addons/web_notify/models/res_users.py:0 #, python-format msgid "Default" msgstr "Predefinito" #. module: web_notify #. odoo-python #: code:addons/web_notify/models/res_users.py:0 #, python-format msgid "Information" msgstr "Informazione" #. module: web_notify #: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name msgid "Notify Danger Channel Name" msgstr "Nome Canale Notifica Pericolo" #. module: web_notify #: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name msgid "Notify Default Channel Name" msgstr "Nome Canale Notifica Predefinito" #. module: web_notify #: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name msgid "Notify Info Channel Name" msgstr "Nome Canale Notifica Informazione" #. module: web_notify #: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name msgid "Notify Success Channel Name" msgstr "Nome Canale Notifica Successo" #. module: web_notify #: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name msgid "Notify Warning Channel Name" msgstr "Nome Canale Notifica Avviso" #. 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 "L'invio di una notifica ad un altro utente è vietato." #. module: web_notify #. odoo-python #: code:addons/web_notify/models/res_users.py:0 #, python-format msgid "Success" msgstr "Successo" #. module: web_notify #: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit msgid "Test danger notification" msgstr "Test notifica pericolo" #. module: web_notify #: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit msgid "Test default notification" msgstr "Test notifica predefinito" #. module: web_notify #: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit msgid "Test info notification" msgstr "Test notifica informazione" #. module: web_notify #: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit msgid "Test success notification" msgstr "Test notifica successo" #. module: web_notify #: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit msgid "Test warning notification" msgstr "Test notifica avviso" #. module: web_notify #: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit msgid "Test web notify" msgstr "Test notifica web" #. module: web_notify #: model:ir.model,name:web_notify.model_res_users msgid "User" msgstr "Utente" #. module: web_notify #. odoo-python #: code:addons/web_notify/models/res_users.py:0 #, python-format msgid "Warning" msgstr "Attenzione" #~ msgid "Users" #~ msgstr "Utenti"
OCA/web/web_notify/i18n/it.po/0
{ "file_path": "OCA/web/web_notify/i18n/it.po", "repo_id": "OCA", "token_count": 1400 }
86
/** @odoo-module */ import {Notification} from "@web/core/notifications/notification"; import {patch} from "web.utils"; patch(Notification.props, "webNotifyProps", { type: { type: String, optional: true, validate: (t) => ["warning", "danger", "success", "info", "default"].includes(t), }, });
OCA/web/web_notify/static/src/js/services/notification.esm.js/0
{ "file_path": "OCA/web/web_notify/static/src/js/services/notification.esm.js", "repo_id": "OCA", "token_count": 139 }
87
# 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). { "name": "Progressive web application", "summary": "Make Odoo a PWA", "version": "16.0.1.0.0", "development_status": "Beta", "category": "Website", "website": "https://github.com/OCA/web", "author": "TAKOBI, Tecnativa, Odoo Community Association (OCA)", "maintainers": ["eLBati"], "license": "LGPL-3", "application": True, "installable": True, "depends": ["web", "mail"], "data": ["templates/assets.xml", "views/res_config_settings_views.xml"], "assets": { "web.assets_backend": [ "/web_pwa_oca/static/src/js/pwa_manager.js", "/web_pwa_oca/static/src/js/webclient.js", ] }, "images": ["static/description/pwa.png"], }
OCA/web/web_pwa_oca/__manifest__.py/0
{ "file_path": "OCA/web/web_pwa_oca/__manifest__.py", "repo_id": "OCA", "token_count": 392 }
88
To use your PWA: #. Open the Odoo web app using a supported browser (See https://caniuse.com/?search=A2HS) #. Open the browser options #. Click on 'Add to Home screen' (or 'Install' in other browsers) ** Maybe you need refresh the page to load the service worker after using the option.
OCA/web/web_pwa_oca/readme/USAGE.rst/0
{ "file_path": "OCA/web/web_pwa_oca/readme/USAGE.rst", "repo_id": "OCA", "token_count": 83 }
89
from . import test_web_pwa_oca_controller
OCA/web/web_pwa_oca/tests/__init__.py/0
{ "file_path": "OCA/web/web_pwa_oca/tests/__init__.py", "repo_id": "OCA", "token_count": 14 }
90
Remember the tree columns' widths across sessions, and after filtering, grouping, or reordering.
OCA/web/web_remember_tree_column_width/readme/DESCRIPTION.rst/0
{ "file_path": "OCA/web/web_remember_tree_column_width/readme/DESCRIPTION.rst", "repo_id": "OCA", "token_count": 21 }
91
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_responsive # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2024-02-12 11:38+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_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #, python-format msgid "Activities" msgstr "Attività" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/search_panel/search_panel.xml:0 #, python-format msgid "All" msgstr "Tutte" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #, python-format msgid "Attachment counter loading..." msgstr "Caricamento contatore allegati..." #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #, python-format msgid "Attachments" msgstr "Allegati" #. 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/control_panel/control_panel.xml:0 #, python-format msgid "CLEAR" msgstr "CANCELLA" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0 #: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0 #, python-format msgid "Discard" msgstr "Abbandona" #. 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/control_panel/control_panel.xml:0 #: code:addons/web_responsive/static/src/components/search_panel/search_panel.xml:0 #, python-format msgid "FILTER" msgstr "FILTRA" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/apps_menu/apps_menu.xml:0 #, python-format msgid "Home Menu" msgstr "Menu home" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #, python-format msgid "Log note" msgstr "Registra nota" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml:0 #: code:addons/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml:0 #, python-format msgid "Maximize" msgstr "Massimizza" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml:0 #: code:addons/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml:0 #, python-format msgid "Minimize" msgstr "Minimizza" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0 #: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0 #, python-format msgid "New" msgstr "Nuovo" #. 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/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 "VEDI RISULTATO" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0 #: code:addons/web_responsive/static/src/legacy/xml/form_buttons.xml:0 #, python-format msgid "Save" msgstr "Salva" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/apps_menu/apps_menu.xml:0 #, python-format msgid "Search menus..." msgstr "Menù ricerca..." #. 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/control_panel/control_panel.xml:0 #, python-format msgid "Search..." msgstr "Cerca..." #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml:0 #, python-format msgid "Send message" msgstr "Invia messaggio" #. module: web_responsive #. odoo-javascript #: code:addons/web_responsive/static/src/components/control_panel/control_panel.xml:0 #, python-format msgid "View switcher" msgstr "Selettore vista"
OCA/web/web_responsive/i18n/it.po/0
{ "file_path": "OCA/web/web_responsive/i18n/it.po", "repo_id": "OCA", "token_count": 1974 }
92
/** @odoo-module **/ /* Copyright 2021 ITerra - Sergey Shebanin * Copyright 2023 Onestein - Anjeel Haria * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */ import LegacyControlPanel from "web.ControlPanel"; import {ControlPanel} from "@web/search/control_panel/control_panel"; import {deviceContext} from "@web_responsive/components/ui_context.esm"; import {patch} from "web.utils"; import {Dropdown} from "@web/core/dropdown/dropdown"; const {useState} = owl; // In v15.0 there are two ControlPanel's. They are mostly the same and are used in legacy and new owl views. // We extend them two mostly the same way. // Patch legacy control panel to add states for mobile quick search patch(LegacyControlPanel.prototype, "web_responsive.LegacyControlPanelMobile", { setup() { this._super(); this.state = useState({ mobileSearchMode: this.props.withBreadcrumbs ? "" : "quick", }); this.ui = deviceContext; }, setMobileSearchMode(ev) { this.state.mobileSearchMode = ev.detail; }, }); // Patch control panel to add states for mobile quick search patch(ControlPanel.prototype, "web_responsive.ControlPanelMobile", { setup() { this._super(); this.state = useState({ mobileSearchMode: "", }); this.ui = deviceContext; }, setMobileSearchMode(ev) { this.state.mobileSearchMode = ev.detail; }, }); Object.assign(LegacyControlPanel.components, {Dropdown});
OCA/web/web_responsive/static/src/components/control_panel/control_panel.esm.js/0
{ "file_path": "OCA/web/web_responsive/static/src/components/control_panel/control_panel.esm.js", "repo_id": "OCA", "token_count": 537 }
93
<?xml version="1.0" encoding="utf-8" ?> <!-- Copyright 2018 Alexandre Díaz Copyright 2021 ITerra - Sergey Shebanin Copyright 2023 Onestein - Anjeel Haria License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> <odoo> <template id="responsive_web_layout" inherit_id="web.layout" name="Responsive Layout" > <xpath expr="//meta[last()]" position="after"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> </xpath> </template> </odoo>
OCA/web/web_responsive/views/web.xml/0
{ "file_path": "OCA/web/web_responsive/views/web.xml", "repo_id": "OCA", "token_count": 290 }
94
.o_form_status_indicator_buttons { margin-left: 10px; .o_form_button_save, .o_form_button_cancel { width: 100%; &.o_form_button_save { background-color: $primary; &:hover { filter: brightness(0.9); } } &.o_form_button_cancel { margin-left: 5px; &:hover { background-color: #f6f7fa; border-color: #e0e2e6; } } .save_button { width: 100%; font-weight: 500; color: white; display: inline-block; text-align: center; vertical-align: middle; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.3rem 2px; font-size: 1.08333333rem; line-height: 1.5; border-radius: 0; transition: none; width: 100%; text-transform: uppercase; font-family: $o-system-fonts; } .discard_button { width: 100%; font-weight: 500; color: white; display: inline-block; text-align: center; vertical-align: middle; user-select: none; color: $primary; background-color: transparent; padding: 0.3rem 2px; font-size: 1.08333333rem; line-height: 1.5; border-radius: 0; transition: none; width: 100%; text-transform: uppercase; font-family: $o-system-fonts; } } }
OCA/web/web_save_discard_button/static/src/scss/indicator_button.scss/0
{ "file_path": "OCA/web/web_save_discard_button/static/src/scss/indicator_button.scss", "repo_id": "OCA", "token_count": 978 }
95
======================== Web Select All Companies ======================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:33e9484d15ff36e8cdab3b893cfdb6c54b11dca7fc7ef89e420edc420d310ec1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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-LGPL--3-blue.png :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-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_select_all_companies :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_select_all_companies :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 module allows you to select or deselect all the companies in a single click. .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_select_all_companies/static/description/select_all_companies.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_select_all_companies%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 ~~~~~~~ * Camptocamp Contributors ~~~~~~~~~~~~ * Telmo Santos <telmo.santos@camptocamp.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_select_all_companies>`_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
OCA/web/web_select_all_companies/README.rst/0
{ "file_path": "OCA/web/web_select_all_companies/README.rst", "repo_id": "OCA", "token_count": 1045 }
96
* Holger Brunn <hbrunn@therp.nl> * Nicolas JEUDY - Sudokeys (https://github.com/njeudy) * Stephane (SOLIBRE) <stephane@omerp.net> * Sylvain LE GAL (https://twitter.com/legalsylvain) * Jérôme Thériault <jtheriault@metalsartigan.com> * Lois Rilo <lois.rilo@forgeflow.com>
OCA/web/web_sheet_full_width/readme/CONTRIBUTORS.rst/0
{ "file_path": "OCA/web/web_sheet_full_width/readme/CONTRIBUTORS.rst", "repo_id": "OCA", "token_count": 119 }
97
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_timeline # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-03-06 20:08+0000\n" "Last-Translator: Ediz Duman <neps1192@gmail.com>\n" "Language-Team: none\n" "Language: tr\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.14.1\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>ATANMADI</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 "Bu kaydı silmek istediğinizden emin misiniz?" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Day" msgstr "Gün" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Month" msgstr "Ay" #. 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\" şablonunda, zaman tablosu görünümü tanımında mevcut değil." #. 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 "Zaman Tablosu" #. 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 "Zaman Tablosunda görünümde 'date_start' özniteliğini tanımlamadı." #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Today" msgstr "Bugün" #. module: web_timeline #: model:ir.model,name:web_timeline.model_ir_ui_view msgid "View" msgstr "Görünüm" #. module: web_timeline #: model:ir.model.fields,field_description:web_timeline.field_ir_ui_view__type msgid "View Type" msgstr "Görünüm Türü" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/js/timeline_controller.esm.js:0 #, python-format msgid "Warning" msgstr "Uyarı" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Week" msgstr "Hafta" #. module: web_timeline #. odoo-javascript #: code:addons/web_timeline/static/src/xml/web_timeline.xml:0 #, python-format msgid "Year" msgstr "Yıl"
OCA/web/web_timeline/i18n/tr.po/0
{ "file_path": "OCA/web/web_timeline/i18n/tr.po", "repo_id": "OCA", "token_count": 1187 }
98
odoo.define("web_timeline.TimelineModel", function (require) { "use strict"; const AbstractModel = require("web.AbstractModel"); const TimelineModel = AbstractModel.extend({ init: function () { this._super.apply(this, arguments); }, load: function (params) { this.modelName = params.modelName; this.fieldNames = params.fieldNames; this.default_group_by = params.default_group_by; if (!this.preload_def) { this.preload_def = $.Deferred(); $.when( this._rpc({ model: this.modelName, method: "check_access_rights", args: ["write", false], }), this._rpc({ model: this.modelName, method: "check_access_rights", args: ["unlink", false], }), this._rpc({ model: this.modelName, method: "check_access_rights", args: ["create", false], }) ).then((write, unlink, create) => { this.write_right = write; this.unlink_right = unlink; this.create_right = create; this.preload_def.resolve(); }); } this.data = { domain: params.domain, context: params.context, }; return this.preload_def.then(this._loadTimeline.bind(this)); }, /** * Read the records for the timeline. * * @private * @returns {jQuery.Deferred} */ _loadTimeline: function () { return this._rpc({ model: this.modelName, method: "search_read", kwargs: { fields: this.fieldNames, domain: this.data.domain, order: [{name: this.default_group_by}], context: this.data.context, }, }).then((events) => { this.data.data = events; this.data.rights = { unlink: this.unlink_right, create: this.create_right, write: this.write_right, }; }); }, }); return TimelineModel; });
OCA/web/web_timeline/static/src/js/timeline_model.js/0
{ "file_path": "OCA/web/web_timeline/static/src/js/timeline_model.js", "repo_id": "OCA", "token_count": 1494 }
99
* Dennis Sluijk <d.sluijk@onestein.nl> * Holger Brunn <mail@hunki-enterprises.com> (https://hunki-enterprises.com)
OCA/web/web_tree_duplicate/readme/CONTRIBUTORS.rst/0
{ "file_path": "OCA/web/web_tree_duplicate/readme/CONTRIBUTORS.rst", "repo_id": "OCA", "token_count": 49 }
100
This widget is currently not working on the product field in the lines tree of the sale order form, see https://github.com/OCA/web/pull/1438 for further details. To add this functionality to lines of sales, purchases and invoices, as they are special views, is required a glue module that add this feature.
OCA/web/web_tree_many2one_clickable/readme/ROADMAP.rst/0
{ "file_path": "OCA/web/web_tree_many2one_clickable/readme/ROADMAP.rst", "repo_id": "OCA", "token_count": 76 }
101
This module add the possibility to insert Bokeh charts into Odoo standard views. .. image:: ../static/description/example.png :alt: Bokeh Chart inserted into an Odoo view :width: 600 px `Bokeh <https://bokeh.pydata.org>`__ is a Python interactive visualization library that targets modern web browsers for presentation. Its goal is to provide elegant, concise construction of basic exploratory and advanced custom graphics in the style of D3.js, but also deliver this capability with high-performance interactivity over very large or streaming datasets. Bokeh can help anyone who would like to quickly and easily create interactive plots, dashboards, and data applications. If you want to see some samples of bokeh's capabilities follow this `link <https://bokeh.pydata.org/en/latest/docs/gallery.html>`_.
OCA/web/web_widget_bokeh_chart/readme/DESCRIPTION.rst/0
{ "file_path": "OCA/web/web_widget_bokeh_chart/readme/DESCRIPTION.rst", "repo_id": "OCA", "token_count": 213 }
102
================================== Web Widget DatePicker Full Options ================================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:5cc5388c1796a804d92121313d4d48a9080f3173acf9dbafe6b2da73f9ae2241 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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_widget_datepicker_fulloptions :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_widget_datepicker_fulloptions :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 module enables full options in datepicker used in date fields : - Choose today's date in one click - Two buttons enabled : choosing today and closing datepicker with selected date .. figure:: https://raw.githubusercontent.com/OCA/web/16.0/web_widget_datepicker_fulloptions/static/description/change.png Clearing field doesn't work because there is a left 'todo' in Odoo core code here : https://github.com/odoo/odoo/blob/16.0/addons/web/static/lib/tempusdominus/tempusdominus.js#L1341 **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_widget_datepicker_fulloptions%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 ~~~~~~~ * GRAP Contributors ~~~~~~~~~~~~ * `GRAP <http://www.grap.coop>`_: * Quentin DUPONT <quentin.dupont@grap.coop> 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_widget_datepicker_fulloptions>`_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
OCA/web/web_widget_datepicker_fulloptions/README.rst/0
{ "file_path": "OCA/web/web_widget_datepicker_fulloptions/README.rst", "repo_id": "OCA", "token_count": 1162 }
103
# 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 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2024-03-05 14:40+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_domain_editor_dialog #. odoo-javascript #: code:addons/web_widget_domain_editor_dialog/static/src/js/domain_field.esm.js:0 #, python-format msgid "Select records..." msgstr "Selezionare record..." #. module: web_widget_domain_editor_dialog #. odoo-javascript #: code:addons/web_widget_domain_editor_dialog/static/src/js/domain_field.esm.js:0 #, python-format msgid "Selected domain" msgstr "Dominio selezionato"
OCA/web/web_widget_domain_editor_dialog/i18n/it.po/0
{ "file_path": "OCA/web/web_widget_domain_editor_dialog/i18n/it.po", "repo_id": "OCA", "token_count": 387 }
104
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_widget_dropdown_dynamic # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-11-27 11:37+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_dropdown_dynamic #. odoo-javascript #: code:addons/web_widget_dropdown_dynamic/static/src/js/field_dynamic_dropdown.esm.js:0 #, python-format msgid "Dynamic Dropdown" msgstr "Dropdown dinamico"
OCA/web/web_widget_dropdown_dynamic/i18n/it.po/0
{ "file_path": "OCA/web/web_widget_dropdown_dynamic/i18n/it.po", "repo_id": "OCA", "token_count": 309 }
105
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_widget_image_webcam # msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" #. module: web_widget_image_webcam #. odoo-javascript #: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:0 #, python-format msgid "Close" msgstr "" #. module: web_widget_image_webcam #. odoo-javascript #: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:0 #, python-format msgid "Save & Close" msgstr "" #. module: web_widget_image_webcam #: model:ir.model,name:web_widget_image_webcam.model_ir_config_parameter msgid "System Parameter" msgstr "" #. module: web_widget_image_webcam #. odoo-javascript #: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:0 #, python-format msgid "Take Snapshot" msgstr "" #. module: web_widget_image_webcam #. odoo-javascript #: code:addons/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml:0 #, python-format msgid "WebCam" msgstr "" #. module: web_widget_image_webcam #. odoo-javascript #: code:addons/web_widget_image_webcam/static/src/js/webcam_widget.js:0 #, python-format msgid "WebCam Booth" msgstr ""
OCA/web/web_widget_image_webcam/i18n/web_widget_image_webcam.pot/0
{ "file_path": "OCA/web/web_widget_image_webcam/i18n/web_widget_image_webcam.pot", "repo_id": "OCA", "token_count": 549 }
106
# Copyright 2020 ForgeFlow, S.L. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { "name": "Web Widget mpld3 Chart", "category": "Hidden", "summary": "This widget allows to display charts using MPLD3 library.", "author": "ForgeFlow, Odoo Community Association (OCA)", "version": "16.0.1.0.0", "website": "https://github.com/OCA/web", "depends": ["web"], "data": [], "external_dependencies": {"python": ["mpld3==0.5.9", "beautifulsoup4"]}, "auto_install": False, "development_status": "Beta", "maintainers": ["JordiBForgeFlow", "ChrisOForgeFlow"], "license": "LGPL-3", "assets": { "web.assets_backend": [ "web_widget_mpld3_chart/static/src/js/*.js", "web_widget_mpld3_chart/static/src/xml/*.xml", ], }, }
OCA/web/web_widget_mpld3_chart/__manifest__.py/0
{ "file_path": "OCA/web/web_widget_mpld3_chart/__manifest__.py", "repo_id": "OCA", "token_count": 360 }
107
<?xml version="1.0" encoding="UTF-8" ?> <templates xml:space="preserve"> <div t-ref="widget" t-name="web_widget_mpld3_chart.Mpld3ChartJsonWidget" owl="1"> <t t-if="props.value.div" t-out="markup(props.value.div)" /> </div> </templates>
OCA/web/web_widget_mpld3_chart/static/src/xml/web_widget_mpld3_chart.xml/0
{ "file_path": "OCA/web/web_widget_mpld3_chart/static/src/xml/web_widget_mpld3_chart.xml", "repo_id": "OCA", "token_count": 114 }
108
# Copyright 2023 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class IrModel(models.Model): _inherit = "ir.model" add_open_tab_field = fields.Boolean(help="Adds open-tab field in list views.")
OCA/web/web_widget_open_tab/models/ir_model.py/0
{ "file_path": "OCA/web/web_widget_open_tab/models/ir_model.py", "repo_id": "OCA", "token_count": 95 }
109
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
OCA/web/web_widget_x2many_2d_matrix/__init__.py/0
{ "file_path": "OCA/web/web_widget_x2many_2d_matrix/__init__.py", "repo_id": "OCA", "token_count": 26 }
110
# Translation of Odoo Server. # This file contains the translation of the following modules: # * web_widget_x2many_2d_matrix # 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_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 "" #, python-format #~ msgid "Sorry no matrix data to display." #~ msgstr "抱歉没有要显示的矩阵数据。" #, python-format #~ msgid "Sum" #~ msgstr "总和" #, python-format #~ msgid "Sum Total" #~ msgstr "总和"
OCA/web/web_widget_x2many_2d_matrix/i18n/zh_CN.po/0
{ "file_path": "OCA/web/web_widget_x2many_2d_matrix/i18n/zh_CN.po", "repo_id": "OCA", "token_count": 444 }
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. # Load our frozen Configoro require File.join(File.dirname(__FILE__), '..', 'vendor', 'configoro', 'simple') rails_root = ENV['RAILS_ROOT'] || File.join(File.dirname(__FILE__), '..') Configoro.paths << File.join(rails_root, 'config', 'environments') $_squash_environments = Dir.glob(File.join(rails_root, 'config', 'environments', '*.rb')).map { |f| File.basename f, '.rb' } def load_groups(configuration_path, values) configuration_path = configuration_path.split('.') $_squash_environments.select do |env| settings = Configoro.load_environment(env) values.include?(traverse_hash(settings, *configuration_path)) end end def traverse_hash(hsh, *keys) return nil unless hsh if keys.size == 1 hsh[keys.first] else traverse_hash hsh[keys.shift], *keys end end def conditionally(configuration_path, *values, &block) groups = load_groups(configuration_path, values) groups.each { |g| group g.to_sym, &block } end
SquareSquash/web/Gemfile.d/_before.rb/0
{ "file_path": "SquareSquash/web/Gemfile.d/_before.rb", "repo_id": "SquareSquash", "token_count": 523 }
112
Squash: A squarish bug spray ============================ **An open-source project from [Square](http://github.com/square)** Squash is a collection of tools that help engineers find and kill bugs in their code by automatically collecting, collating and analyzing run time exceptions. Squash consists of the following components: * **Client libraries:** Client libraries for different systems (Ruby, Ruby on Rails, Cocoa with Objective-C, etc.) catch and record errors when they occur, then send them to the API endpoint. Client libraries can be found under the [SquareSquash organization](https://github.com/SquareSquash). * **Front-end:** This website displays Bug information and helps the engineer find the root cause for a Bug, and fix it. It also lets engineers manage, assign, and comment on Bugs, as well as view statistics about the Bug. * **API endpoints:** These routes (part of the front-end app) receive exception notifications from the client libraries and process them. This project is the front-end and the API. Pull requests are more than welcome; please check out [CONTRIBUTING.md](file.CONTRIBUTING.html) for details. How to Install -------------- To get started, run the `bin/setup` file. This script will ask you a series of questions and generate a preliminary configuration for your site install. When the script is completed, you can run `git status` to see what files it changed, and refine your configuration from there. Once the script is complete, Squash should run for most typical development environments. Simply run `rails s` and visit the site in your Web browser. You should be able to start using it immediately. You can also verify correctness by running `rspec spec`. Configuring and deploying the production instance is entirely up to you and your particular production environment. Additional configuration options can be found in the following locations: * `config/application.rb` * `config/environments/*.rb` * `config/environments/*/*.yml` If you don't see what you're looking for in any of those files, you'll probably have to change the code to make it work. Don't be afraid -- the code is thoroughly documented and should (hopefully) be very accessible. ### Requirements Squash requires the following: * Ruby 1.9.2 or newer (JRuby with `--1.9` is supported) * Multithreading support (see the next section) * PostgreSQL 9.1 or newer * The Bundler gem * Git 1.7 or newer ### Notes on some of the gem and library choices **Why do you specifically require PostgreSQL?** Squash uses a lot of PostgreSQL-specific features to make efficient use of the database and maintain referential integrity, such as: * foreign key constraints, * triggered cached counters, * check constraints, and * semantic indexes for text-based search. If PostgreSQL is out of the question, some of these features can be ported to other RDBMSes; simply edit the `InitialSchema` migration and update the SQL as necessary. If portability is required, a lot of these features can be reimplemented in the Rails layer (e.g., cached counters), at the risk of degraded referential integrity. (If you are reimplementing the cached counters in Ruby, be sure to modify the `config/initializers/active_record.rb` file as appropriate.) If you do successfully port Squash to another RDBMS, let me know. I'd be happy to take your changes. **Why do you bundle an edge version of Rails?** The `3-2-stable` branch of Ruby on Rails includes some changes to Active Record that are required by Squash's multithreaded concurrency model (see next question). In particular, that version of Active Record includes crucial changes to the connection pool and connection reopening logic. If you set the `background_runner` option in the `concurrency.yml` file to something other than `Multithread`, the Gemfile will automatically drop Rails back down to the latest release version. **Why don't you use my favorite backgrounding library?** Squash was originally built for Square, which runs all its services on JRuby. Using threads is very efficient in JRuby, and avoids the overhead of having to deploy both a website and workers. If you are running Squash in a non-thread-safe (or multithreading-unfriendly) environment, you can use Sidekiq or Resque instead. If you want to use some other backgrounding library, you can easily write your own adapter. All threaded code is invoked using {BackgroundRunner.run}, which then uses the settings in the `concurrency.yml` Configoro file to invoke the correct module under `lib/background_runner`. The default is to use {BackgroundRunner::Multithread}, which uses the {Multithread} module to execute the task in its own thread. You can edit the YAML file and switch the background runner to Resque, or implement your own `BackgroundRunner` module. See the {BackgroundRunner} documentation for more details. If you do this successfully and wish to save future Squash users the effort, feel free to turn your changes into a pull request. **Why aren't you using RedCarpet?** As mentioned above, Squash was originally built to run under JRuby. RedCarpet has compiled C extensions; Kramdown is pure Ruby. **Why do you require a recent version of Git?** Squash uses the `git clone --mirror` command to create local mirrors of client projects' Git repositories. **Why don't you have integration tests or acceptance tests?** To be 100% honest, lack of familiarity on these things in Ruby/Rails. Happy for any help people want to extend towards this goal. **Why are you using Erector?** I like Erector. Documentation ------------- Comprehensive documentation is written in YARD- and Markdown-formatted comments throughout the source. To view this documentation as an HTML site, run `rake yard`. CoffeeScript libraries are documented using the YARD format as well, but YARD does not as yet recognize them as documentable files. A `.codoopts` file is included in case you wish to use [Codo](https://github.com/netzpirat/codo) to generate the CoffeeScript docs, but as of now Codo does not recognize the ERb files, and does not use the full set of Markdown syntax features used in the documentation. Project Overview ---------------- ### Views This is a pretty typical Rails website, save for the views, which are written using Erector. The views forgo the traditional Rails concepts of partials and templates in favor of analogous OOP concepts more familiar to software developers: methods and inheritance. All views inherit from an abstract Erector widget which provides layout; and all views have their content split into multiple private methods. In addition to the usual helpers (in `app/helpers`), there are view mixins under `app/views/additions` that simplify view coding. Embedded code snippets are all rendered using the {CommitsController#context} action. This action loads the appropriate file and revision from the Git repository and returns a snippet plus the name of the SyntaxHighlighter brush to use. The brush is determined from the file name/extension; the mapping can be found in `data/brushes.yml`. This view behavior is provided from a JavaScript library file in `lib/assets/javascripts`. There are many similar helper classes in there; they are documented but the documentation is not recognized by YARD and so is not included in this documentation set. JavaScript files are organized into four possible locations: * Third-party JavaScript libraries are in `vendor/assets/javascripts` and loaded in the `application.js` manifest. * JavaScript modules or helpers that are not specific to a particular page or site area are in `lib/assets/javascripts` and also loaded in `application.js`. * JavaScript modules or helpers specific to a particular area of the site are in `app/assets/javascripts` and also loaded in `application.js`. * Small JavaScript snippets, glue code, or other code intended to add dynamic behavior to a specific page is in a `.js` file named the same as, and placed alongside, the `.html.rb` view file. For example, if `app/views/projects/new.html.rb` needed a bit of JS glue code, it would be placed in `app/views/projects/new.js`. This code is placed in a `<SCRIPT>` tag at the end of the view by the {Views::Layouts::Application#inline_javascript} method. CSS files are similarly organized: * Third-party CSS files are in `vendor/assets/stylesheets` and loaded in the `application.css` manifest. * CSS styles or helpers global to the entire website are in `lib/assets/stylesheets` and also loaded in `application.css`. * CSS styles specific to a single page or a related group of pages are placed in `app/assets/stylesheets` and also loaded in `application.css`. Each `<BODY>` tag is given a class name equal to the controller name, and an ID equal to the controller and action name separated with a dash. For instance, the `projects/new` action's body would be `<body class=projects id=projects-new>`. ### Controllers For information about requests and responses, see {ApplicationController}. ### Models Models make extensive use of advanced PostgreSQL features for efficiency and convenience. Cached counters are updated using triggers and rules, foreign key constraints and hooks are enforced at the database level, and validations are backed up by corresponding `CHECK` triggers. This helps ensure referential and data integrity even in situations where Rails fails, or outside of the Rails stack. See the various migrations to learn more about the triggers, rules, and constraints being used. Observers are used for more high-level triggers, such as creating {Event Events} at the appropriate times, or sending emails. See the classes in `app/models/observers` for more. Models also use the HasMetadataColumn gem to reduce their width and incorporate schemaless data. Most models have a JSON-formatted `metadata` column to which new information can be added or removed without having to create new migrations. ### Tasks Various Rake tasks are available under `lib/tasks`. These include tasks for pruning and maintaining the database, development tasks, and configuring the workers. ### Workers Workers are found in the `lib/workers` directory. Along with OccurrencesWorker, which stores and categorizes Occurrences, there are other workers for managing Deploys and other minor tasks. These workers are run asynchronously using {Multithread}. ### Mailers Notification mails are sent by the {NotificationMailer}. It and any other mailers live in `app/mailers`. `NotificationMailer` conditionally delivers emails. An email will only be delivered if all of the following conditions are met: * The Project has a mailing list email configured (for the critical-bugs and all-bugs mailing lists), * the Environment's `sends_emails` attribute is `true`, and * the User has enabled receipt of that category of emails (typically specified in the Membership). ### Authentication and Authorization Authentication is done using either password verification or LDAP; see {AuthenticationHelpers} and related controller mixins, as well as the model mixins under `app/models/additions` for more information. There are four permissions levels that a User can have, specific to an individual Project: **Non-members** do not have a {Membership} record with a Project. They can view Bugs and Occurrences, view the Project's API key, view the list of other Project members, watch Bugs, and comment on Bugs. **Members** can do everything non-members can do, and can also assign Bugs, be assigned Bugs, and modify/delete Bugs. **Administrators** can do everything members can do, and can also modify Project and Environment settings, regenerate the API key, promote and demote members to administrator status, and modify/delete others' Comments. **Owners** (each Project has only one) can do everything administrators can do, and can also delete the Project and reassign ownership. Recording and Categorizing Occurrences -------------------------------------- ### Client-Specific Information The client library identifiers used throughout the website determine how a Bug reported from that library is presented in the view. The {OccurrencesController::INDEX_FIELDS} constant maps a client library identifier to the relevant summary fields to display in the list view. Each occurrence is transmitted with the name of the client library; the {Occurrence} records this to the `client` field. The {Bug}'s `client` field is set from the first Occurrence's; in general, one should expect that all Occurrences of a Bug share the same client value. Regardless of the Occurrence's client value, all fields for which there is data are displayed in the Occurrence view. If a client library is updated to add new information fields, all that is needed is to update the `has_metadata` hash in Occurrence with the new fields, and to update the `occurrences#show` view as necessary. (The `INDEX_FIELDS` hash can also be updated as appropriate.) If a new client library is added, in addition to doing the above for any new fields unique to the new client, the `INDEX_FIELDS` hash will need to be expanded to include the new client. ### Queue Consumer For information about the background worker that converts incoming exception information into Occurrence and Bug records (including doing "best guess" commit blaming, determining which Occurrences share the same root Bug, etc.), see the documentation for the {OccurrencesWorker} module. See also **Static Analysis** below. ### Deploys and Releases Squash can handle both _deployed_ projects (hosted projects for which typically only one version is live at a time) and _released_ projects (distributed apps for which many versions may exist "in the wild"). If you are developing a released project, you must associate your {Deploy} objects with a unique version identifier (such as a build number). You must also send the correct build identifier with every occurrence report. See the client library and API controller documentation for more information. Once this is done, Squash's behavior is changed slightly: Bugs that are fixed in an older release, but recur, are not reopened. Bugs that are fixed in an older release but then recur in newer releases are treated as completely separate Bugs. This app exposes an API endpoint for notifying Squash of new releases/deploys of your Project. You should notify Squash whenever you deploy your Project (or release a new version) so that it can properly manage Bugs (automatically mark fixed Bugs as deployed, associate new Bugs with the new Deploy, etc.). Most client libraries include an easy means to add this feature to your deploy or release process. Static Analysis --------------- ### Message Normalization When an Occurrence is grouped into a Bug, its message is stripped of any non-relevant or situational information. (Note that since the message is not used as a dimension in grouping Occurrences, two Occurrences of the same Bug could have completely different messages. A Bug gets its message from its first Occurrence.) This is done by subclasses of {Blamer::Base}. For most messages, this is done using simple regex subsitution. Squash can also normalize an exception's message using a list of known message templates. Such templates are stored in the `data/message_templates.yml` file. The file contains a hash mapping exception class names to an array of arrays. Each inner array contains two elements: the regexp to match the exception message on, and the replacement message should it match. These templates are evaluated in the order they appear in the array. Scripts that regenerate the templates for MySQL and PostgreSQL error strings can be found under the `script` directory. ### Version Control Systems As of now, Squash is only compatible with projects that are version-controlled using Git. However, in the interest of remaining as VCS-agnostic as possible, commit identifiers are never called "SHA1s," but instead "IDs." ### Unsymbolicated, Obfuscated, or Minified Stack Traces Client libraries of compiled, obfuscated, or minified applications will need to convert their stack traces in order for them to be of use for static analysis. Because release builds are typically not distributed with embedded decompilation information, a mapping or table must be given to Squash, so that when Squash receives an unconverted stack trace, it can perform lookups and convert it to a more usable format. Currently, the supported conversions are: * symbolication of iOS exceptions (see {Symbolication}), * deobfuscation of Java exceptions (see {ObfuscationMap}), * and source-mapping of JavaScript exceptions (see {SourceMap}). Client libraries are responsible for delivering the raw stack trace data to Squash when an exception occurs, and for delivering lookup tables to Squash upon each new release. {Api::V1Controller} has endpoints for these purposes in various languages. Unconverted stack traces are stored in a particular format; see {Occurrence} for more information. When a new exception with a stack trace in this format is received, Squash immediately attempts to convert it using an existing matching lookup table. If no such table is found, the stack trace is left unconverted. It can still be viewed on the front end. When, later, a new lookup table is added, Squash automatically finds and converts any matching stack traces. Because every new Occurrence must be assigned a Bug (including unconverted Occurrences), it is possible that the "blamed" `file` and `line` fields of the Bug could themselves be unconverted. The {Bug} class has provisions to support this; see in particular `bugs.special_file`. Specs ----- All models, controllers, and library files are unit-tested with RSpec specs under the `spec` directory. Run unit tests with the `rspec spec` command. Views and JavaScript files are not specced. No integration or acceptance tests are written. Almost all unit tests use factories rather than mocks, putting them somewhat closer to integration tests. In general, the test environment is identical to the development/production environment, save for the usual Rails allowances, and the `config/initializers/active_record_observer_hooks.rb` file. This file adds after-commit hooks to observers (identical to those available to models). However, specs are transactionalized, meaning that these hooks wouldn't run until after the spec is completed, resulting in multiple spec failures. To remedy this, the file introspects on the environment, and instead links the observer hooks to the `after_save` model hooks in the test environment. This differentiates the test and live environments, but allows specs to pass. If you wish to bring your test environment closer to production, you can set the `use_transactional_fixtures` RSpec setting to false. The hooks file will automatically detect the change and use the correct `after_commit` hooks. Currently, all specs pass with and without transactionalized fixtures. Third-Party Integrations ------------------------ Squash supports integration with a handful of popular other developer tools. ### PagerDuty When Squash is integrated with PagerDuty, it will begin sending exceptions to PagerDuty once the Occurrence count for a given Bug exceeds the Project's critical threshold. Thereafter, every Occurrence is sent to PagerDuty as a trigger. The triggers are grouped into alerts by Bug, so users will only be paged once per new error. In addition, marking a Bug fixed will also automatically resolve its associated PagerDuty alert (if any), and assigning a Bug or marking it irrelevant automatically acknowledges any associated PagerDuty alert. In order to integrate Squash with PagerDuty, you must 1. generate an API key that Squash can use for PagerDuty access (you must be a PagerDuty admin to do this), 2. update the `config/environments/common/pagerduty.yml` file to enable PagerDuty integration and provide the API key, 3. configure Generic API services for each escalation policy you wish to use, and 4. set the PagerDuty-related options in your Project's configuration page. ### JIRA When Squash is integrated with JIRA, users have the option of associating a JIRA issue with any Bug. The Management tab will then display a link allowing the user to quickly view the associated issue. In addition, the user can have Squash watch the JIRA issue for status updates. Once the JIRA issue is resolved (or is changed to someother specified status), the Bug can be automatically marked as fixed. By associating multiple Bugs with one JIRA issue in such a manner, a user can quickly fix a large number of Bugs by closing just one JIRA issue. Finally, a "Create JIRA Issue" button is provided on the Management tab allowing users to easily create new JIRA issues for any Bug. In order to integrate Squash with JIRA, you must 1. configure the `config/environments/common/jira.yml` file with your JIRA authentication credentials and installation location, and 2. add a cron job or other periodic task that runs `rake jira:update`. JIRA integration works out-of-the-box if you use username/password authentication. OAuth authentication requires a few more steps. Because OAuth authentication requires user actions, you will need to obtain an access token and secret which the JIRA client can use without needing to prompt the user. You can do this by running the `jira_oauth.rb` script: ```` ruby rails runner script/jira_oauth.rb ```` Follow the instructions to set up your JIRA integration.
SquareSquash/web/README.md/0
{ "file_path": "SquareSquash/web/README.md", "repo_id": "SquareSquash", "token_count": 5261 }
113
footer { p { text-align: center; color: rgb(159, 159, 159); margin-top: 20px; margin-bottom: 10px; } }
SquareSquash/web/app/assets/stylesheets/_footer.scss/0
{ "file_path": "SquareSquash/web/app/assets/stylesheets/_footer.scss", "repo_id": "SquareSquash", "token_count": 59 }
114
@import "vars"; body.sessions { .modal-container p { font-size: $h5-size; } .body-portion { h3 { margin-top: 50px; } form { &>div { margin: 10px 0; &:last-child { margin-bottom: 0; } } .row .columns { padding: 0 5px; &:first-child { padding-left: 0; } &:last-child { padding-right: 0; } } input[type=submit] { width: 100%; } } } }
SquareSquash/web/app/assets/stylesheets/sessions.css.scss/0
{ "file_path": "SquareSquash/web/app/assets/stylesheets/sessions.css.scss", "repo_id": "SquareSquash", "token_count": 217 }
115
# 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 for working with objects that are accessed from a {Project}'s # repository (mainly commits). This controller is capable of managing the # situation where the repository is very slow or inaccessible. class CommitsController < ApplicationController brushes = YAML.load_file(Rails.root.join('data', 'brushes.yml')) # A map of file extensions to the SyntaxHighlighter brush to use. BRUSH_FOR_EXTENSION = brushes['by_extension'] # A map of file names to the SyntaxHighlighter brush to use. BRUSH_FOR_FILENAME = brushes['by_filename'] # The SyntaxHighligher brush to use for unknown file types. DEFAULT_BRUSH = brushes['default'] before_filter :find_project respond_to :json # Responds with the 10 most recent commits. # # Routes # ------ # # * `GET /projects/:project_id/commits` # # Path Parameters # --------------- # # | | | # |:-------------|:--------------------| # | `project_id` | The Project's slug. | def index @commits = @project.repo.log(10) respond_with @commits end # Responds with a context snippet given a revision, file, and line. The # response includes the context snippet and some metadata about it in JSON # format. # # Routes # ------ # # * `GET /projects/:project_id/commits/:id/context.json` # # Path Parameters # --------------- # # | | | # |:-------------|:--------------------------------------------------------------| # | `project_id` | The Project's slug. | # | `id` | The identifier of the source code revision to use (required). | # # Query Parameters # ---------------- # # | | | # |:----------|:-----------------------------------------------------------------------------| # | `file` | The path to the file, relative to the project root (required). | # | `line` | The line number within the file (required). | # | `context` | The number of lines of context to use before and after the line (default 3). | # # Responses # --------- # # ### Successful response: 200 OK # # The response body will be a JSON-encoded hash with the following keys: # # | | | # |:-------------|:-----------------------------------------------------------------------| # | `code` | The code context snippet. | # | `brush` | The name of a SyntaxHighlighter brush to use when displaying the code. | # | `first_line` | The line number of the first line in the snippet. | # # ### Error responses # # All error response bodies will be a JSON-encoded hash with one key, `error`, # containing the localized error description. The following errors are # possible: # # * Required parameter missing: 400 Bad Request # * Repository couldn't be loaded: 422 Unprocessable Entity # * Commit not found: 422 Unprocessable Entity # * File not found in repo: 422 Unprocessable Entity # * Line number out of bounds: 422 Unprocessable Entity def context if @project.repo.nil? return respond_to do |format| format.json { render json: {error: t('controllers.commits.context.repo_nil')}, status: :unprocessable_entity } end end if params[:file].blank? || params[:line].blank? return respond_to do |format| format.json { render json: {error: t('controllers.commits.context.missing_param')}, status: :bad_request } end end blob = @project.repo.object(params[:id] + '^{tree}:' + params[:file]) rescue nil if blob.nil? @project.repo(&:fetch) blob = @project.repo.object(params[:id] + '^{tree}:' + params[:file]) rescue nil if blob.nil? return respond_to do |format| format.json { render json: {error: t('controllers.commits.context.commit_not_found')}, status: :unprocessable_entity } end end end context = (params[:context].presence || 3).to_i context = 3 if context < 0 line = params[:line].to_i lines = blob.contents.split("\n") if line < 1 || line > lines.size return respond_to do |format| format.json { render json: {error: t('controllers.commits.context.line_out_of_bounds')}, status: :unprocessable_entity } end end top_line = [line-context-1, 0].max bottom_line = [line+context-1, lines.size - 1].min snippet = lines[top_line, bottom_line-top_line+1] # remove blank lines from the top of the code snippet; otherwise # SyntaxHighlighter will remove them but fail to renumber the line numbers # correctly while snippet.first.empty? snippet.shift top_line += 1 end brush = brush_from_filename(File.basename(params[:file])) respond_to do |format| format.json { render json: {code: snippet.join("\n"), brush: brush, first_line: top_line + 1} } end end private def brush_from_filename(name) ext_brush = BRUSH_FOR_EXTENSION[BRUSH_FOR_EXTENSION.keys.detect { |ext| name.end_with? ext }] BRUSH_FOR_FILENAME[name] || ext_brush || DEFAULT_BRUSH end end
SquareSquash/web/app/controllers/commits_controller.rb/0
{ "file_path": "SquareSquash/web/app/controllers/commits_controller.rb", "repo_id": "SquareSquash", "token_count": 2290 }
116
# 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. # Helper methods for email content. module MailHelper include TextBacktraceRendering # The typical maximum line width for plaintext emails (per RFC 2822). EMAIL_WRAP_WIDTH = 78 # Quotes a text block for email use. Adds chevron(s) and a space before each # line. Rewraps the content only as necessary to keep total width at 78 # characters: Other line breaks are preserved. # # @param [String] text The text to quote. # @param [Fixnum] level The quote level. # @return [String] The quoted text. def email_quote(text, level=1) width = EMAIL_WRAP_WIDTH - level - 1 lines = word_wrap(text, line_width: width).split("\n") lines.map!(&:lstrip) lines.map! { |line| '>'*level + ' ' + line } lines.join("\n") end # Rewraps content for email use. Double line breaks are considered to be new # paragraphs. Single line breaks are considered to be wraps and are replaced # with spaces. New line breaks are added as necessary. # # @param [String] text The text to rewrap. # @param [Fixnum] width The new width to wrap to. # @return [String] The rewrapped text. def email_rewrap(text, width=EMAIL_WRAP_WIDTH) paragraphs = text.split("\n\n") paragraphs.each { |para| para.gsub("\n", ' ') } paragraphs.map! { |para| email_wrap para, width } paragraphs.join("\n\n") end # Wraps content for email use. Similar to {#email_rewrap}, but existing line # breaks are preserved. New line breaks are added as necessary to keep total # line width under `width`. # # @param [String] text The text to wrap. # @param [Fixnum] width The new width to wrap to. # @return [String] The wrapped text. def email_wrap(text, width=EMAIL_WRAP_WIDTH) lines = word_wrap(text, line_width: width).split("\n") lines.map!(&:lstrip) lines.join("\n") end end
SquareSquash/web/app/helpers/mail_helper.rb/0
{ "file_path": "SquareSquash/web/app/helpers/mail_helper.rb", "repo_id": "SquareSquash", "token_count": 797 }
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. # A join table associating a {User} with a {Project} he is a member of. While it # is implied that a project's owner is also a member, a Membership is created to # that effect as well, just to be thorough. # # Memberships can be marked as `admin`, in which case they can create and delete # other memberships. Only the project owner can confer and revoke admin status, # or assign project ownership to another user. # # Associations # ============ # # | | | # |:----------|:---------------------------------------------| # | `user` | The {User} having membership in the project. | # | `project` | The {Project} the user is a member of. | # # Properties # ========== # # | | | # |:--------|:----------------------------------------------------------------------------------------| # | `admin` | If true, this member has the ability to add and remove other users to/from the project. | # # Metadata # ======== # # | | | # |:-------------------------|:-----------------------------------------------------------------------------------------------------------------| # | `send_assignment_emails` | If `true`, emails will be sent when the User is assigned to a Bug in this Project. | # | `send_comment_emails` | If `true`, emails will be sent when a User comments on a Bug in this Project that this User is participating in. | # | `send_resolution_emails` | If `true`, emails will be sent when a Bug in this Project that the User is assigned to is resolved. | class Membership < ActiveRecord::Base self.primary_keys = :user_id, :project_id belongs_to :user, inverse_of: :memberships belongs_to :project, inverse_of: :memberships attr_readonly :user, :project include HasMetadataColumn has_metadata_column( send_assignment_emails: {type: Boolean, default: true}, send_comment_emails: {type: Boolean, default: false}, send_resolution_emails: {type: Boolean, default: true} ) validates :user, presence: true validates :project, presence: true delegate :to_param, to: :user scope :project_prefix, ->(query) { joins(:project).where("LOWER(projects.name) LIKE ?", query.downcase.gsub(/[^a-z0-9\-_]/, '') + '%') } scope :user_prefix, ->(query) { joins(:user).where("LOWER(users.username) LIKE ?", query.downcase.gsub(/[^a-z0-9\-_]/, '') + '%') } scope :for, ->(user, project) { user = user.id if user.kind_of?(User) project = project.id if project.kind_of?(Project) where(user_id: user, project_id: project) } # @private def as_json(options=nil) options ||= {} options[:except] = Array.wrap(options[:except]) + [:user_id, :project_id, :id] super(options).merge(user: user.as_json, project: project.as_json) end # @return [:owner, :admin, :member] The user's role in this project. # @see #human_role def role return :owner if project.owner_id == user_id return :admin if admin? return :member end # @return [String] A localized string representation of {#role}. def human_role I18n.t "models.membership.role.#{role}" end end
SquareSquash/web/app/models/membership.rb/0
{ "file_path": "SquareSquash/web/app/models/membership.rb", "repo_id": "SquareSquash", "token_count": 1502 }
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. # An association created when a {User} watches a {Bug}. {Event Events} created # for that Bug will appear in the User's feed. # # Associations # ============ # # | | | # |:-------|:-----------------------------| # | `user` | The {User} watching the Bug. | # | `bug` | The {Bug} being watched. | class Watch < ActiveRecord::Base self.primary_keys = :user_id, :bug_id belongs_to :user, inverse_of: :watches belongs_to :bug, inverse_of: :watches validates :user, presence: true validates :bug, presence: true validate :user_cannot_watch_foreign_bug # @private def as_json(options=nil) options ||= {} options[:except] = Array.wrap(options[:except]) + [:user_id, :bug_id] options[:include] = Array.wrap(options[:include]) + [:user, :bug] super options end private def user_cannot_watch_foreign_bug errors.add(:bug_id, :no_permission) unless user.role(bug.environment.project) end end
SquareSquash/web/app/models/watch.rb/0
{ "file_path": "SquareSquash/web/app/models/watch.rb", "repo_id": "SquareSquash", "token_count": 554 }
119
The fix for this bug has just been deployed: <%= project_environment_bug_url @bug.environment.project, @bug.environment, @bug %> Project: <%= @bug.environment.project.name %> Environment: <%= @bug.environment.name %> Revision: <%= @bug.revision %> Blamed Commit: <%= @bug.blamed_revision %> Fix Commit: <%= @bug.resolution_revision %> <%= @bug.class_name %> <% if @bug.special_file? %> in <%= @bug.file %> <% else %> in <%= @bug.file %>:<%= @bug.line %> <% end %> <%= @bug.message_template %> Yours truly, Squash
SquareSquash/web/app/views/notification_mailer/deploy.text.erb/0
{ "file_path": "SquareSquash/web/app/views/notification_mailer/deploy.text.erb", "repo_id": "SquareSquash", "token_count": 238 }
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. $(document).ready(function() { new PageManager().setup(); }); function PageManager() { this.setup = function() { this.resetClickBinds(); this.setupSendsEmailsCheckboxes(); new MemberPanel($('#members'), "<%= escape_javascript @project.name %>", "<%= @project.to_param %>", "<%= users_url %>", "<%= project_memberships_url(@project, format: 'json') %>", "<%= project_membership_url(@project, 'USERID', format: 'json') %>", "<%= project_url(@project, format: 'json') %>", "<%= current_user.role(@project).to_s %>", window.location.hash == '#change_owner'); }; this.setupSendsEmailsCheckboxes = function() { $('.environment form').each(function(_, formElement) { var form = new SmartForm($(formElement), function() {}); $(formElement).find('input[type=checkbox]').click(function() { form.submit(); }); }); }; this.resetClickBinds = function() { var self = this; $('a.make-default').click(function(e) { $.ajax("<%= project_url @project, format: 'json' %>", { type: 'PATCH', data: $.param({ 'project[default_environment_id]': $(e.currentTarget).data('id'), '<%= request_forgery_protection_token %>': '<%= form_authenticity_token %>' }), success: function() { // change Default to Make Default var parent = $('#default-indicator').parent(); var id = $('#default-indicator').data('id'); parent.empty(); $('<a/>').text('Make default').attr({href: '#', 'data-id': id}).addClass('make-default').appendTo(parent); // change Make Default to Default parent = $(e.currentTarget).parent(); id = $(e.currentTarget).data('id'); parent.empty(); $('<strong/>').text("Default").attr({'data-id': id, id: 'default-indicator'}).appendTo(parent); self.resetClickBinds(); }, error: function() { new Flash('alert').text("An error occurred when setting the default environment."); } }); }); }; }
SquareSquash/web/app/views/projects/show.js.erb/0
{ "file_path": "SquareSquash/web/app/views/projects/show.js.erb", "repo_id": "SquareSquash", "token_count": 1176 }
121
--- url:
SquareSquash/web/config/environments/test/people.yml/0
{ "file_path": "SquareSquash/web/config/environments/test/people.yml", "repo_id": "SquareSquash", "token_count": 5 }
122
--- name: Squash basePath: '/api/1.0' description: | The API for Squash allows client libraries to notify Squash of exceptions and deploys, and upload data that Squash can use to analyze incoming exceptions (e.g., source maps, symbolication data, etc.).
SquareSquash/web/doc/fdoc/squash.fdoc.service/0
{ "file_path": "SquareSquash/web/doc/fdoc/squash.fdoc.service", "repo_id": "SquareSquash", "token_count": 73 }
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. root = exports ? this # Loads and renders a Bug's Event feed. Events are rendered into a UL element # with LI elements for each event. Styling is done in events.css.scss. # class root.Feed # Creates a new Feed manager. Calls {#load}. # # @param [String] url The Ajax endpoint to load feed items from. # @param [jQuery element array] element The jQuery element to render the feed # into. # @param [Object] options Additional options. # @option options [Boolean] bugHeader If `true`, renders a header above each # Event indicating which Bug it applies to. # constructor: (@url, @element, @options) -> @options ||= {} this.load() # Loads Events and renders them into the element. If an error occurs, creates # and displays a flash message. # load: -> @element.empty() $.ajax @url, type: 'GET' success: (events) => if events.length == 0 p = $('<p/>').addClass('no-results').text(" bugs to populate your feed.").appendTo(@element) $('<i/>').addClass('fa fa-star').prependTo p return last_bug_url = null last_group_ul = @element for event in events do (event) => if @options.bugHeader && last_bug_url != event.bug.url parent_li = $('<li/>').addClass('event-group').appendTo(@element) h6 = $('<h5/>').text(" #{event.bug.class_name} in #{formatBugFile event.bug}").appendTo(parent_li) a = $('<a/>').text("#{event.project.name} (#{event.environment.name}) ##{event.bug.number}: ").attr('href', event.bug.url).prependTo(h6) last_group_ul = $('<ul/>').appendTo(parent_li) last_bug_url = event.bug.url if @options.bugHeader li = $('<li/>').addClass('event').appendTo(last_group_ul) $('<i/>').addClass("fa fa-#{event.icon}").appendTo li p = $('<div/>').addClass('event-content').appendTo(li) if event.kind == 'open' this.renderOpenEvent event, p else if event.kind == 'comment' this.renderCommentEvent event, p else if event.kind == 'assign' this.renderAssignEvent event, p else if event.kind == 'close' this.renderCloseEvent event, p else if event.kind == 'reopen' this.renderReopenEvent event, p else if event.kind == 'deploy' this.renderDeployEvent event, p else if event.kind == 'email' this.renderEmailEvent event, p else if event.kind == 'dupe' this.renderDupeEvent event, p $('<time/>').attr('datetime', event.created_at).appendTo(li).liveUpdate() error: => new Flash('alert').text("Couldn’t load the event timeline.") # @private renderOpenEvent: (event, p) -> p.append "This bug first occurred." # @private renderCommentEvent: (event, p) -> if event.user $('<a/>').text(if event.user_you then "You" else event.user.name).attr('href', event.user_url).appendTo p else p.append "Someone" p.append " commented on this bug:" if event.comment then $('<blockquote/>').html(event.comment_body).appendTo(p) # @private renderAssignEvent: (event, p) -> if event.assigner? && event.assignee? # someone assigned this bug to someone $('<a/>').text(if event.user_you then "You" else event.assigner.name).attr('href', event.user_url).appendTo p p.append " assigned this bug to " if event.user_you && event.assignee_you p.append "yourself" else if event.assignee_you p.append "you" else if event.assigner.username == event.assignee.username p.append "him/herself" else $('<a/>').text(event.assignee.name).attr('href', event.assignee_url).appendTo p else if event.assigner? # someone unassigned this bug $('<a/>').text(if event.user_you then "You" else event.assigner.name).attr('href', event.user_url).appendTo p p.append " unassigned this bug" else if event.assignee? # unknown person assigned this bug p.append "Someone assigned this bug to " $('<a/>').text(if event.user_you then "you" else event.assigner.name).attr('href', event.user_url).appendTo p else # unknown person unassigned this bug p.append "Someone unassigned this bug" p.append "." # @private renderCloseEvent: (event, p) -> if event.revision span = $('<span/>').addClass('aux').text " (" if event.revision_url $('<a/>').attr('href', event.revision_url).text(event.revision.slice(0, 6)).appendTo span else span.append event.revision.slice(0, 6) span.append ")" if event.issue p.append "This bug was automatically marked as fixed by " $('<a/>').text(event.issue).attr('href', url).appendTo p if span then span.appendTo(p) p.append "." else if event.user $('<a/>').text(if event.user_you then "You" else event.user.name).attr('href', event.user_url).appendTo p if event.status == 'irrelevant' p.append " marked this bug as irrelevant" else p.append " fixed this bug" if span then span.appendTo(p) p.append "." else if event.status == 'irrelevant' p.append "This bug was marked as irrelevant." else p.append "This bug was marked as fixed" if span then span.appendTo(p) p.append "." # @private renderReopenEvent: (event, p) -> if event.user $('<a/>').text(if event.user_you then "You" else event.user.name).attr('href', event.user_url).appendTo p if event.from == 'irrelevant' p.append " marked this bug as relevant." else p.append " reopened this bug." else if event.from == 'relevant' p.append "This bug was marked as relevant." else p.append "This bug was reopened" if event.occurrence p.append " by " $('<a/>').attr('href', event.occurrence_url).text("occurrence ##{event.occurrence.number}").appendTo p p.append "." # @private renderDeployEvent: (event, p) -> if event.build p.append "The fix was released as part of build " $('<strong/>').text(event.build).appendTo p if event.revision p.append " (revision " if event.revision_url $('<a/>').attr('href', event.revision_url).text(event.revision.slice(0, 6)).appendTo p else p.append event.revision.slice(0, 6) p.append ")" else p.append "The fix was deployed" if event.revision p.append " with revision " if event.revision_url $('<a/>').attr('href', event.revision_url).text(event.revision.slice(0, 6)).appendTo p else p.append event.revision.slice(0, 6) p.append "." # @private renderEmailEvent: (event, p) -> p.append "An email alert about this bug was sent to " p.append toSentence("<strong>#{em}</strong>" for em in event.recipients) p.append "." # @private renderDupeEvent: (event, p) -> if event.user $('<a/>').text(if event.user_you then "You" else event.user.name).attr('href', event.user_url).appendTo p p.append " flagged this bug as a duplicate of " else p.append "This bug was flagged as a duplicate of " $('<a/>').attr('href', event.original_url).text("##{event.original.number}").appendTo p p.append "."
SquareSquash/web/lib/assets/javascripts/feed.js.coffee/0
{ "file_path": "SquareSquash/web/lib/assets/javascripts/feed.js.coffee", "repo_id": "SquareSquash", "token_count": 3280 }
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. module BackgroundRunner # Mixin included into every worker that operates with {BackgroundRunner}. module Job extend ActiveSupport::Concern included do if BackgroundRunner.runner.respond_to?(:extend_job) # call extend_job for this class... BackgroundRunner.runner.extend_job self # ... and all subclasses ... subclasses.each { |klass| BackgroundRunner.runner.extend_job klass } # ... and all future subclasses class_eval <<-RUBY def self.inherited(subclass) BackgroundRunner.runner.extend_job subclass end RUBY end end end end
SquareSquash/web/lib/background_runner/job.rb/0
{ "file_path": "SquareSquash/web/lib/background_runner/job.rb", "repo_id": "SquareSquash", "token_count": 425 }
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. module Service # JIRA integration module. Creates JIRA issues from Bug information. # # In order to use JIRA integration in your Squash installation, you must # configure the `jira.yml` Configoro file. This file supports the following # keys: # # | | | # |:-----------------|:------------------------------------------------| # | `disabled` | Set to `false` to enable JIRA support. | # | `authentication` | A hash of authentication options (see below). | # | `api_host` | The host of the JIRA installation, with scheme. | # | `api_root` | The path of the JIRA root URL under the host. | # # The `authentication` hash must have a key called `strategy`; currently the # only supported value is "basic" for HTTP Basic authentication. The `user` # and `password` keys must also be present under this hash. # # JIRA integration is done using the "jira-ruby" gem. module JIRA extend self # Returns the link to a new issue page with pre-filled values. See the JIRA # `CreateIssueDetails` action documentation for more information on possible # values. # # @param [Hash<String, String>] properties Values to pre-fill. # @return [String, nil] A URL to the uncreated JIRA issue, or `nil` if JIRA # integration is disabled. def new_issue_link(properties) return nil if Squash::Configuration.jira.disabled? url "#{Squash::Configuration.jira.create_issue_details}?#{properties.to_query}" end # Locates an issue by its key. # # @param [String] key The issue key (e.g., "PROJ-123"). # @return [JIRA::Resource::Issue, nil] The issue with that key, if found. def issue(key) return nil if Squash::Configuration.jira.disabled? begin client.Issue.find(key) rescue ::JIRA::HTTPError nil end end # @return [Array<JIRA::Resource::Status>] All known JIRA issue statuses. def statuses() client.Status.all end # @return [Array<JIRA::Resource::Project>] All known JIRA projects. def projects() client.Project.all end def url(path) "#{Squash::Configuration.jira.api_host}#{Squash::Configuration.jira.api_root}#{path}" end def client(additional_options={}) @client ||= begin options = { site: Squash::Configuration.jira.api_host, context_path: Squash::Configuration.jira.api_root, timeout: 2, open_timeout: 2, read_timeout: 2 }.merge(additional_options) case Squash::Configuration.jira.authentication.strategy when 'basic' options[:auth_type] = :basic options[:username] = Squash::Configuration.jira.authentication.user options[:password] = Squash::Configuration.jira.authentication.password when 'oauth' options[:private_key_file] = Squash::Configuration.jira.authentication.private_key_file options[:consumer_key] = Squash::Configuration.jira.authentication.consumer_key end cl = ::JIRA::Client.new options if Squash::Configuration.jira.authentication[:token] && Squash::Configuration.jira.authentication[:secret] cl.set_access_token Squash::Configuration.jira.authentication.token, Squash::Configuration.jira.authentication.secret end cl end end end end
SquareSquash/web/lib/service/jira.rb/0
{ "file_path": "SquareSquash/web/lib/service/jira.rb", "repo_id": "SquareSquash", "token_count": 1539 }
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. # Simple worker class that sends the following emails when appropriate: # # * everyone on a {Bug}'s `notify_on_occurrence` list, # * frequency-based email and PagerDurity notifications when frequency # thresholds are tripped, and # * the project-wide critical email if the critical threshold was breached. # # See {NotificationThreshold} for more information on frequency-based # notification. class OccurrenceNotificationMailer include BackgroundRunner::Job # Creates a new instance and sends notification emails. # # @param [Fixnum] occurrence_id The ID of a new Occurrence. def self.perform(occurrence_id) new(Occurrence.find(occurrence_id)).perform end # Creates a new worker instance. # # @param [Occurrence] occurrence A new Occurrence. def initialize(occurrence) @occurrence = occurrence end # Emails all Users who enabled per-occurrence notifications, and all # frequency-based notifications as appropriate. def perform if @occurrence.bug.occurrences_count == @occurrence.bug.environment.project.critical_threshold && !@occurrence.bug.fixed? && !@occurrence.bug.irrelevant? NotificationMailer.critical(@occurrence.bug).deliver_now end User.where(id: @occurrence.bug.notify_on_occurrence).each do |user| NotificationMailer.occurrence(@occurrence, user).deliver_now end @occurrence.bug.notification_thresholds.cursor.each do |thresh| begin if thresh.tripped? NotificationMailer.threshold(@occurrence.bug, thresh.user).deliver_now thresh.touch :last_tripped_at end rescue => err # for some reason the cursors gem eats exceptions Squash::Ruby.notify err, occurrence: @occurrence, notification_threshold: thresh end end end end
SquareSquash/web/lib/workers/occurrence_notification_mailer.rb/0
{ "file_path": "SquareSquash/web/lib/workers/occurrence_notification_mailer.rb", "repo_id": "SquareSquash", "token_count": 769 }
127
# 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_helper' RSpec.describe CommitsController, type: :controller do describe '#index' do before :all do Project.where(repository_url: 'https://github.com/RISCfuture/better_caller.git').delete_all @project = FactoryGirl.create(:project, repository_url: 'https://github.com/RISCfuture/better_caller.git') end it "should require a logged-in user" do get :index, project_id: @project.to_param, format: 'json' expect(response.status).to eql(401) end context '[authenticated]' do before(:each) { login_as @project.owner } it "should return the 10 most recent commits" do get :index, project_id: @project.to_param, format: 'json' expect(response.status).to eql(200) expect(JSON.parse(response.body).size).to eql(10) end end end describe "#context" do before :all do Project.where(repository_url: 'https://github.com/RISCfuture/better_caller.git').delete_all @project = FactoryGirl.create(:project, repository_url: 'https://github.com/RISCfuture/better_caller.git') end before(:each) { @valid_params = {project_id: @project.to_param, id: '30e7c2ff8758f4f19bfbc0a57e26c19ab69d1d44', file: 'lib/better_caller/extensions.rb', line: 7, format: 'json'} } it "should require a logged-in user" do get :context, @valid_params expect(response.status).to eql(401) end context '[authenticated]' do before(:each) { login_as @project.owner } it "should return an error if the project has no repository" do project = FactoryGirl.create(:project, owner: @project.owner, repository_url: 'git@github.com:RISCfuture/doesnt-exist.git') get :context, @valid_params.merge(project_id: project.to_param) expect(response.status).to eql(422) expect(JSON.parse(response.body)['error']).to include('repository') end it "should return an error if the file param is missing" do get :context, @valid_params.merge(file: nil) expect(response.status).to eql(400) expect(JSON.parse(response.body)['error']).to include('Missing') end it "should return an error if the line param is missing" do get :context, @valid_params.merge(line: nil) expect(response.status).to eql(400) expect(JSON.parse(response.body)['error']).to include('Missing') end it "should return an error if the line param is less than 1" do get :context, @valid_params.merge(line: 0) expect(response.status).to eql(422) expect(JSON.parse(response.body)['error']).to include('out of range') end it "should return an error if the line param is greater than the number of lines in the file" do get :context, @valid_params.merge(line: 15) expect(response.status).to eql(422) expect(JSON.parse(response.body)['error']).to include('out of range') end it "should use 3 lines of context by default" do get :context, @valid_params expect(response.status).to eql(200) expect(JSON.parse(response.body)['code']).to eql(<<-TEXT.chomp) def set_better_backtrace(bt) @better_backtrace = bt.collect do |(file, line, meth, bind)| vars = { local_variables: eval("local_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), instance_variables: eval("instance_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), global_variables: eval("global_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), } TEXT end it "should use 3 lines context if an invalid value for the context param is given" do get :context, @valid_params.merge(context: -1) expect(response.status).to eql(200) expect(JSON.parse(response.body)['code']).to eql(<<-TEXT.chomp) def set_better_backtrace(bt) @better_backtrace = bt.collect do |(file, line, meth, bind)| vars = { local_variables: eval("local_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), instance_variables: eval("instance_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), global_variables: eval("global_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), } TEXT end it "should use a custom number of lines of context" do get :context, @valid_params.merge(context: 2) expect(response.status).to eql(200) expect(JSON.parse(response.body)['code']).to eql(<<-TEXT.chomp) @better_backtrace = bt.collect do |(file, line, meth, bind)| vars = { local_variables: eval("local_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), instance_variables: eval("instance_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), global_variables: eval("global_variables.inject({}) { |hsh, var| hsh[var] = eval(var) ; hsh }", bind), TEXT end it "should clamp the context at the top of the file" do get :context, @valid_params.merge(line: 1) expect(response.status).to eql(200) expect(JSON.parse(response.body)['code']).to eql(<<-TEXT.chomp) # @private class Exception # @private def set_better_backtrace(bt) TEXT end it "should clamp the context at the bottom of the file" do get :context, @valid_params.merge(line: 14) expect(response.status).to eql(200) expect(JSON.parse(response.body)['code']).to eql(<<-TEXT.chomp) [ file, line, meth, vars] end end end TEXT end it "should return an error given a nonexistent path" do get :context, @valid_params.merge(file: 'foo/bar.rb') expect(response.status).to eql(422) expect(JSON.parse(response.body)['error']).to include('Couldn’t find that commit') end it "should update the repo given an unknown revision" do allow(Project).to receive(:find_from_slug!).and_return(@project) expect(@project.repo).to receive(:fetch).once get :context, @valid_params.merge(id: '39aacf78b603ade2034e93b9b12420b350dfa151') # unknown revision expect(response.status).to eql(422) expect(JSON.parse(response.body)['error']).to include('Couldn’t find that commit') end it "should return an error given a nonexistent file" do get :context, @valid_params.merge(file: 'lib/foo.rb') expect(response.status).to eql(422) expect(JSON.parse(response.body)['error']).to include('Couldn’t find that commit') end it "should pick an appropriate brush" do get :context, @valid_params expect(response.status).to eql(200) expect(JSON.parse(response.body)['brush']).to eql('ruby') get :context, @valid_params.merge(file: 'Rakefile') expect(response.status).to eql(200) expect(JSON.parse(response.body)['brush']).to eql('ruby') get :context, @valid_params.merge(file: 'ext/better_caller.c') expect(response.status).to eql(200) expect(JSON.parse(response.body)['brush']).to eql('cpp') end it "should return a correct first_line value" do get :context, @valid_params expect(response.status).to eql(200) expect(JSON.parse(response.body)['first_line']).to eql(4) end it "should reject blank lines from the top of the snippet" do get :context, @valid_params.merge(file: 'LICENSE.txt', line: 5) expect(response.status).to eql(200) rsp = JSON.parse(response.body) expect(rsp['first_line']).to eql(3) expect(rsp['code']).to eql(<<-TEXT.chomp) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to TEXT end end end end
SquareSquash/web/spec/controllers/commits_controller_spec.rb/0
{ "file_path": "SquareSquash/web/spec/controllers/commits_controller_spec.rb", "repo_id": "SquareSquash", "token_count": 3503 }
128
# 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 MessageTemplateMatcher do before :all do @mysql_error = <<-ERR.strip Duplicate entry 'foo@example.com' for key 'index_users_on_email': UPDATE `users` SET `name` = 'Sancho Sample', `crypted_password` = '349857346384697346', `updated_at` = '2012-09-23 21:18:37', `email` = 'foo@example.com' WHERE `id` = 123456 -- app/controllers/api/v1/user_controller.rb:35 ERR @pg_error = <<-ERR.strip relation "users" does not exist Position: 312: SELECT a.attname as column_name, format_type(a.atttypid, a.atttypmod) as column_type, d.adsrc as column_default, a.attnotnull as column_not_null FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum ERR end describe "#matched_substring" do it "should remove the query from an error message" do expect(MessageTemplateMatcher.instance.matched_substring('Mysql::Error', @mysql_error)).to eql("Duplicate entry 'foo@example.com' for key 'index_users_on_email'") end it "should return the original message if no match was found" do expect(MessageTemplateMatcher.instance.matched_substring('SomeError', @mysql_error)).to eql(@mysql_error) expect(MessageTemplateMatcher.instance.matched_substring('Mysql::Error', 'foobar')).to eql('foobar') end it "should use references to other error types" do expect(MessageTemplateMatcher.instance.matched_substring('ActiveRecord::JDBCError', 'ERROR: ' + @mysql_error)).to eql("Duplicate entry 'foo@example.com' for key 'index_users_on_email'") expect(MessageTemplateMatcher.instance.matched_substring('ActiveRecord::JDBCError', 'ERROR: ' + @pg_error)).to eql('ERROR: relation "users" does not exist') end end describe "#sanitized_message" do it "should filter the error message" do expect(MessageTemplateMatcher.instance.sanitized_message('Mysql::Error', @mysql_error)).to eql("Duplicate entry '[STRING]' for key '[STRING]'") end it "should return nil if no match was found" do expect(MessageTemplateMatcher.instance.sanitized_message('SomeError', @mysql_error)).to be_nil expect(MessageTemplateMatcher.instance.sanitized_message('Mysql::Error', 'foobar')).to be_nil end it "should use references to other error types" do expect(MessageTemplateMatcher.instance.sanitized_message('ActiveRecord::JDBCError', 'ERROR: ' + @mysql_error)).to eql("Duplicate entry '[STRING]' for key '[STRING]'") expect(MessageTemplateMatcher.instance.sanitized_message('ActiveRecord::JDBCError', 'ERROR: ' + @pg_error)).to eql('[STRING] [STRING] does not exist') end end end
SquareSquash/web/spec/lib/message_template_matcher_spec.rb/0
{ "file_path": "SquareSquash/web/spec/lib/message_template_matcher_spec.rb", "repo_id": "SquareSquash", "token_count": 1214 }
129
/* Flot plugin for rendering pie charts. Copyright (c) 2007-2012 IOLA and Ole Laursen. Licensed under the MIT license. The plugin assumes that each series has a single data value, and that each value is a positive integer or zero. Negative numbers don't make sense for a pie chart, and have unpredictable results. The values do NOT need to be passed in as percentages; the plugin will calculate the total and per-slice percentages internally. * Created by Brian Medendorp * Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars The plugin supports these options: series: { pie: { show: true/false radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto' innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show) offset: { top: integer value to move the pie up or down left: integer value to move the pie left or right, or 'auto' }, stroke: { color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF') width: integer pixel width of the stroke }, label: { show: true/false, or 'auto' formatter: a user-defined function that modifies the text/style of the label text radius: 0-1 for percentage of fullsize, or a specified pixel length background: { color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000') opacity: 0-1 }, threshold: 0-1 for the percentage value at which to hide labels (if they're too small) }, combine: { threshold: 0-1 for the percentage value at which to combine slices (if they're too small) color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined label: any text value of what the combined slice should be labeled } highlight: { opacity: 0-1 } } } More detail and specific examples can be found in the included HTML file. */ (function($) { // Maximum redraw attempts when fitting labels within the plot var REDRAW_ATTEMPTS = 10; // Factor by which to shrink the pie when fitting labels within the plot var REDRAW_SHRINK = 0.95; function init(plot) { var canvas = null, target = null, maxRadius = null, centerLeft = null, centerTop = null, processed = false, ctx = null; // interactive variables var highlights = []; // add hook to determine if pie plugin in enabled, and then perform necessary operations plot.hooks.processOptions.push(function(plot, options) { if (options.series.pie.show) { options.grid.show = false; // set labels.show if (options.series.pie.label.show == "auto") { if (options.legend.show) { options.series.pie.label.show = false; } else { options.series.pie.label.show = true; } } // set radius if (options.series.pie.radius == "auto") { if (options.series.pie.label.show) { options.series.pie.radius = 3/4; } else { options.series.pie.radius = 1; } } // ensure sane tilt if (options.series.pie.tilt > 1) { options.series.pie.tilt = 1; } else if (options.series.pie.tilt < 0) { options.series.pie.tilt = 0; } } }); plot.hooks.bindEvents.push(function(plot, eventHolder) { var options = plot.getOptions(); if (options.series.pie.show) { if (options.grid.hoverable) { eventHolder.unbind("mousemove").mousemove(onMouseMove); } if (options.grid.clickable) { eventHolder.unbind("click").click(onClick); } } }); plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) { var options = plot.getOptions(); if (options.series.pie.show) { processDatapoints(plot, series, data, datapoints); } }); plot.hooks.drawOverlay.push(function(plot, octx) { var options = plot.getOptions(); if (options.series.pie.show) { drawOverlay(plot, octx); } }); plot.hooks.draw.push(function(plot, newCtx) { var options = plot.getOptions(); if (options.series.pie.show) { draw(plot, newCtx); } }); function processDatapoints(plot, series, datapoints) { if (!processed) { processed = true; canvas = plot.getCanvas(); target = $(canvas).parent(); options = plot.getOptions(); plot.setData(combine(plot.getData())); } } function combine(data) { var total = 0, combined = 0, numCombined = 0, color = options.series.pie.combine.color, newdata = []; // Fix up the raw data from Flot, ensuring the data is numeric for (var i = 0; i < data.length; ++i) { var value = data[i].data; // If the data is an array, we'll assume that it's a standard // Flot x-y pair, and are concerned only with the second value. // Note how we use the original array, rather than creating a // new one; this is more efficient and preserves any extra data // that the user may have stored in higher indexes. if ($.isArray(value)) { if ($.isNumeric(value[1])) { value[1] = +value[1]; } else { value[1] = 0; } } else if ($.isNumeric(value)) { value = [1, +value]; } else { value = [1, 0]; } data[i].data = [value]; } // Calculate the total of all slices, so we can show percentages for (var i = 0; i < data.length; ++i) { total += data[i].data[0][1]; } for (var i = 0; i < data.length; ++i) { var value = data[i].data[0][1]; if (value / total <= options.series.pie.combine.threshold) { combined += value; numCombined++; if (!color) { color = data[i].color; } } else { newdata.push({ data: [[1, value]], color: data[i].color, label: data[i].label, angle: value * Math.PI * 2 / total, percent: value / (total / 100) }); } } if (numCombined > 0) { newdata.push({ data: [[1, combined]], color: color, label: options.series.pie.combine.label, angle: combined * Math.PI * 2 / total, percent: combined / (total / 100) }); } return newdata; } function draw(plot, newCtx) { if (!target) { return; // if no series were passed } var canvasWidth = plot.getPlaceholder().width(), canvasHeight = plot.getPlaceholder().height(), legendWidth = target.children().filter(".legend").children().width() || 0; ctx = newCtx; // WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE! // When combining smaller slices into an 'other' slice, we need to // add a new series. Since Flot gives plugins no way to modify the // list of series, the pie plugin uses a hack where the first call // to processDatapoints results in a call to setData with the new // list of series, then subsequent processDatapoints do nothing. // The plugin-global 'processed' flag is used to control this hack; // it starts out false, and is set to true after the first call to // processDatapoints. // Unfortunately this turns future setData calls into no-ops; they // call processDatapoints, the flag is true, and nothing happens. // To fix this we'll set the flag back to false here in draw, when // all series have been processed, so the next sequence of calls to // processDatapoints once again starts out with a slice-combine. // This is really a hack; in 0.9 we need to give plugins a proper // way to modify series before any processing begins. processed = false; // calculate maximum radius and center point maxRadius = Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2; centerTop = canvasHeight / 2 + options.series.pie.offset.top; centerLeft = canvasWidth / 2; if (options.series.pie.offset.left == "auto") { if (options.legend.position.match("w")) { centerLeft += legendWidth / 2; } else { centerLeft -= legendWidth / 2; } } else { centerLeft += options.series.pie.offset.left; } if (centerLeft < maxRadius) { centerLeft = maxRadius; } else if (centerLeft > canvasWidth - maxRadius) { centerLeft = canvasWidth - maxRadius; } var slices = plot.getData(), attempts = 0; // Keep shrinking the pie's radius until drawPie returns true, // indicating that all the labels fit, or we try too many times. do { if (attempts > 0) { maxRadius *= REDRAW_SHRINK; } attempts += 1; clear(); if (options.series.pie.tilt <= 0.8) { drawShadow(); } } while (!drawPie() && attempts < REDRAW_ATTEMPTS) if (attempts >= REDRAW_ATTEMPTS) { clear(); target.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>"); } if (plot.setSeries && plot.insertLegend) { plot.setSeries(slices); plot.insertLegend(); } // we're actually done at this point, just defining internal functions at this point function clear() { ctx.clearRect(0, 0, canvasWidth, canvasHeight); target.children().filter(".pieLabel, .pieLabelBackground").remove(); } function drawShadow() { var shadowLeft = options.series.pie.shadow.left; var shadowTop = options.series.pie.shadow.top; var edge = 10; var alpha = options.series.pie.shadow.alpha; var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; if (radius >= canvasWidth / 2 - shadowLeft || radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop || radius <= edge) { return; // shadow would be outside canvas, so don't draw it } ctx.save(); ctx.translate(shadowLeft,shadowTop); ctx.globalAlpha = alpha; ctx.fillStyle = "#000"; // center and rotate to starting position ctx.translate(centerLeft,centerTop); ctx.scale(1, options.series.pie.tilt); //radius -= edge; for (var i = 1; i <= edge; i++) { ctx.beginPath(); ctx.arc(0, 0, radius, 0, Math.PI * 2, false); ctx.fill(); radius -= i; } ctx.restore(); } function drawPie() { var startAngle = Math.PI * options.series.pie.startAngle; var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; // center and rotate to starting position ctx.save(); ctx.translate(centerLeft,centerTop); ctx.scale(1, options.series.pie.tilt); //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera // draw slices ctx.save(); var currentAngle = startAngle; for (var i = 0; i < slices.length; ++i) { slices[i].startAngle = currentAngle; drawSlice(slices[i].angle, slices[i].color, true); } ctx.restore(); // draw slice outlines if (options.series.pie.stroke.width > 0) { ctx.save(); ctx.lineWidth = options.series.pie.stroke.width; currentAngle = startAngle; for (var i = 0; i < slices.length; ++i) { drawSlice(slices[i].angle, options.series.pie.stroke.color, false); } ctx.restore(); } // draw donut hole drawDonutHole(ctx); ctx.restore(); // Draw the labels, returning true if they fit within the plot if (options.series.pie.label.show) { return drawLabels(); } else return true; function drawSlice(angle, color, fill) { if (angle <= 0 || isNaN(angle)) { return; } if (fill) { ctx.fillStyle = color; } else { ctx.strokeStyle = color; ctx.lineJoin = "round"; } ctx.beginPath(); if (Math.abs(angle - Math.PI * 2) > 0.000000001) { ctx.moveTo(0, 0); // Center of the pie } //ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera ctx.arc(0, 0, radius,currentAngle, currentAngle + angle / 2, false); ctx.arc(0, 0, radius,currentAngle + angle / 2, currentAngle + angle, false); ctx.closePath(); //ctx.rotate(angle); // This doesn't work properly in Opera currentAngle += angle; if (fill) { ctx.fill(); } else { ctx.stroke(); } } function drawLabels() { var currentAngle = startAngle; var radius = options.series.pie.label.radius > 1 ? options.series.pie.label.radius : maxRadius * options.series.pie.label.radius; for (var i = 0; i < slices.length; ++i) { if (slices[i].percent >= options.series.pie.label.threshold * 100) { if (!drawLabel(slices[i], currentAngle, i)) { return false; } } currentAngle += slices[i].angle; } return true; function drawLabel(slice, startAngle, index) { if (slice.data[0][1] == 0) { return true; } // format label text var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter; if (lf) { text = lf(slice.label, slice); } else { text = slice.label; } if (plf) { text = plf(text, slice); } var halfAngle = ((startAngle + slice.angle) + startAngle) / 2; var x = centerLeft + Math.round(Math.cos(halfAngle) * radius); var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt; var html = "<span class='pieLabel' id='pieLabel" + index + "' style='position:absolute;top:" + y + "px;left:" + x + "px;'>" + text + "</span>"; target.append(html); var label = target.children("#pieLabel" + index); var labelTop = (y - label.height() / 2); var labelLeft = (x - label.width() / 2); label.css("top", labelTop); label.css("left", labelLeft); // check to make sure that the label is not outside the canvas if (0 - labelTop > 0 || 0 - labelLeft > 0 || canvasHeight - (labelTop + label.height()) < 0 || canvasWidth - (labelLeft + label.width()) < 0) { return false; } if (options.series.pie.label.background.opacity != 0) { // put in the transparent background separately to avoid blended labels and label boxes var c = options.series.pie.label.background.color; if (c == null) { c = slice.color; } var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;"; $("<div class='pieLabelBackground' style='position:absolute;width:" + label.width() + "px;height:" + label.height() + "px;" + pos + "background-color:" + c + ";'></div>") .css("opacity", options.series.pie.label.background.opacity) .insertBefore(label); } return true; } // end individual label function } // end drawLabels function } // end drawPie function } // end draw function // Placed here because it needs to be accessed from multiple locations function drawDonutHole(layer) { if (options.series.pie.innerRadius > 0) { // subtract the center layer.save(); var innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius; layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color layer.beginPath(); layer.fillStyle = options.series.pie.stroke.color; layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false); layer.fill(); layer.closePath(); layer.restore(); // add inner stroke layer.save(); layer.beginPath(); layer.strokeStyle = options.series.pie.stroke.color; layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false); layer.stroke(); layer.closePath(); layer.restore(); // TODO: add extra shadow inside hole (with a mask) if the pie is tilted. } } //-- Additional Interactive related functions -- function isPointInPoly(poly, pt) { for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1])) && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0]) && (c = !c); return c; } function findNearbySlice(mouseX, mouseY) { var slices = plot.getData(), options = plot.getOptions(), radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius, x, y; for (var i = 0; i < slices.length; ++i) { var s = slices[i]; if (s.pie.show) { ctx.save(); ctx.beginPath(); ctx.moveTo(0, 0); // Center of the pie //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here. ctx.arc(0, 0, radius, s.startAngle, s.startAngle + s.angle / 2, false); ctx.arc(0, 0, radius, s.startAngle + s.angle / 2, s.startAngle + s.angle, false); ctx.closePath(); x = mouseX - centerLeft; y = mouseY - centerTop; if (ctx.isPointInPath) { if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) { ctx.restore(); return { datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i }; } } else { // excanvas for IE doesn;t support isPointInPath, this is a workaround. var p1X = radius * Math.cos(s.startAngle), p1Y = radius * Math.sin(s.startAngle), p2X = radius * Math.cos(s.startAngle + s.angle / 4), p2Y = radius * Math.sin(s.startAngle + s.angle / 4), p3X = radius * Math.cos(s.startAngle + s.angle / 2), p3Y = radius * Math.sin(s.startAngle + s.angle / 2), p4X = radius * Math.cos(s.startAngle + s.angle / 1.5), p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5), p5X = radius * Math.cos(s.startAngle + s.angle), p5Y = radius * Math.sin(s.startAngle + s.angle), arrPoly = [[0, 0], [p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p5X, p5Y]], arrPoint = [x, y]; // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt? if (isPointInPoly(arrPoly, arrPoint)) { ctx.restore(); return { datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i }; } } ctx.restore(); } } return null; } function onMouseMove(e) { triggerClickHoverEvent("plothover", e); } function onClick(e) { triggerClickHoverEvent("plotclick", e); } // trigger click or hover event (they send the same parameters so we share their code) function triggerClickHoverEvent(eventname, e) { var offset = plot.offset(); var canvasX = parseInt(e.pageX - offset.left); var canvasY = parseInt(e.pageY - offset.top); var item = findNearbySlice(canvasX, canvasY); if (options.grid.autoHighlight) { // clear auto-highlights for (var i = 0; i < highlights.length; ++i) { var h = highlights[i]; if (h.auto == eventname && !(item && h.series == item.series)) { unhighlight(h.series); } } } // highlight the slice if (item) { highlight(item.series, eventname); } // trigger any hover bind events var pos = { pageX: e.pageX, pageY: e.pageY }; target.trigger(eventname, [pos, item]); } function highlight(s, auto) { //if (typeof s == "number") { // s = series[s]; //} var i = indexOfHighlight(s); if (i == -1) { highlights.push({ series: s, auto: auto }); plot.triggerRedrawOverlay(); } else if (!auto) { highlights[i].auto = false; } } function unhighlight(s) { if (s == null) { highlights = []; plot.triggerRedrawOverlay(); } //if (typeof s == "number") { // s = series[s]; //} var i = indexOfHighlight(s); if (i != -1) { highlights.splice(i, 1); plot.triggerRedrawOverlay(); } } function indexOfHighlight(s) { for (var i = 0; i < highlights.length; ++i) { var h = highlights[i]; if (h.series == s) return i; } return -1; } function drawOverlay(plot, octx) { var options = plot.getOptions(); var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; octx.save(); octx.translate(centerLeft, centerTop); octx.scale(1, options.series.pie.tilt); for (var i = 0; i < highlights.length; ++i) { drawHighlight(highlights[i].series); } drawDonutHole(octx); octx.restore(); function drawHighlight(series) { if (series.angle <= 0 || isNaN(series.angle)) { return; } //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString(); octx.fillStyle = "rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor octx.beginPath(); if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) { octx.moveTo(0, 0); // Center of the pie } octx.arc(0, 0, radius, series.startAngle, series.startAngle + series.angle / 2, false); octx.arc(0, 0, radius, series.startAngle + series.angle / 2, series.startAngle + series.angle, false); octx.closePath(); octx.fill(); } } } // end init (plugin body) // define pie specific options and their default values var options = { series: { pie: { show: false, radius: "auto", // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value) innerRadius: 0, /* for donut */ startAngle: 3/2, tilt: 1, shadow: { left: 5, // shadow left offset top: 15, // shadow top offset alpha: 0.02 // shadow alpha }, offset: { top: 0, left: "auto" }, stroke: { color: "#fff", width: 1 }, label: { show: "auto", formatter: function(label, slice) { return "<div style='font-size:x-small;text-align:center;padding:2px;color:" + slice.color + ";'>" + label + "<br/>" + Math.round(slice.percent) + "%</div>"; }, // formatter function radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value) background: { color: null, opacity: 0 }, threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow) }, combine: { threshold: -1, // percentage at which to combine little slices into one larger slice color: null, // color to give the new slice (auto-generated if null) label: "Other" // label to give the new slice }, highlight: { //color: "#fff", // will add this functionality once parseColor is available opacity: 0.5 } } } }; $.plot.plugins.push({ init: init, options: options, name: "pie", version: "1.1" }); })(jQuery);
SquareSquash/web/vendor/assets/javascripts/flot/pie.js/0
{ "file_path": "SquareSquash/web/vendor/assets/javascripts/flot/pie.js", "repo_id": "SquareSquash", "token_count": 9454 }
130
/** * 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() { // Copyright 2006 Shin, YoungJin var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' + 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' + 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' + 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' + 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' + 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' + 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' + 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' + 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' + 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' + 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' + 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' + 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' + 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' + 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' + 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' + 'char char16_t char32_t bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' + 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' + 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' + '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' + 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' + 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' + 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' + 'va_list wchar_t wctrans_t wctype_t wint_t signed'; var keywords = 'alignas alignof auto break case catch class const constexpr decltype __finally __exception __try ' + 'const_cast continue private public protected __declspec ' + 'default delete deprecated dllexport dllimport do dynamic_cast ' + 'else enum explicit extern if for friend goto inline ' + 'mutable naked namespace new noinline noreturn nothrow noexcept nullptr ' + 'ref register reinterpret_cast return selectany ' + 'sizeof static static_cast static_assert struct switch template this ' + 'thread thread_local throw true false try typedef typeid typename union ' + 'using uuid virtual void volatile whcar_t while'; var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' + 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' + 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' + 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' + 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' + 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' + 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' + 'fwrite getc getchar gets perror printf putc putchar puts remove ' + 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' + 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' + 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' + 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' + 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' + 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' + 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' + 'clock ctime difftime gmtime localtime mktime strftime time'; this.regexList = [ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings { regex: /^ *#.*/gm, css: 'preprocessor' }, { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' }, { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' }, { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' } ]; }; Brush.prototype = new SyntaxHighlighter.Highlighter(); Brush.aliases = ['cpp', 'cc', 'c++', 'c', 'h', 'hpp', 'h++']; SyntaxHighlighter.brushes.Cpp = Brush; // CommonJS typeof(exports) != 'undefined' ? exports.Brush = Brush : null; })();
SquareSquash/web/vendor/assets/javascripts/sh/shBrushCpp.js/0
{ "file_path": "SquareSquash/web/vendor/assets/javascripts/sh/shBrushCpp.js", "repo_id": "SquareSquash", "token_count": 2281 }
131
/** * 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() { // Contributed by Gheorghe Milas and Ahmad Sherif var keywords = 'and assert break class continue def del elif else ' + 'except exec finally for from global if import in is ' + 'lambda not or pass raise return try yield while'; var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' + 'chr classmethod cmp coerce compile complex delattr dict dir ' + 'divmod enumerate eval execfile file filter float format frozenset ' + 'getattr globals hasattr hash help hex id input int intern ' + 'isinstance issubclass iter len list locals long map max min next ' + 'object oct open ord pow print property range raw_input reduce ' + 'reload repr reversed round set setattr slice sorted staticmethod ' + 'str sum super tuple type type unichr unicode vars xrange zip'; var special = 'None True False self cls class_'; this.regexList = [ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, { regex: /^\s*@\w+/gm, css: 'decorator' }, { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' }, { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' }, { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' }, { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' }, { regex: /\b\d+\.?\w*/g, css: 'value' }, { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' } ]; this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); }; Brush.prototype = new SyntaxHighlighter.Highlighter(); Brush.aliases = ['py', 'python']; SyntaxHighlighter.brushes.Python = Brush; // CommonJS typeof(exports) != 'undefined' ? exports.Brush = Brush : null; })();
SquareSquash/web/vendor/assets/javascripts/sh/shBrushPython.js/0
{ "file_path": "SquareSquash/web/vendor/assets/javascripts/sh/shBrushPython.js", "repo_id": "SquareSquash", "token_count": 978 }
132
# This module handles initialization of the Configoro object, and contains some # utility methods. module Configoro # Creates the configuration dictionary and stores it under # `MyApp::Configuration` (assuming an application named `MyApp`). def self.initialize namespace.const_set :Configuration, load_environment(Rails.env) end # The search paths Configoro uses to locate configuration files. By default # this list contains one item, `RAILS_ROOT/config/environments`. You can edit # this list to add your own search paths. Any such paths should have # subdirectories for each environment, and `common`, as expected by Configoro. # # Be sure to add paths before the Configoro initializer is called (see the # example). # # Paths are processed in the order they appear in this array. # # @return [Array<String>] An editable array of search paths. # # @example Adding additional paths (application.rn) # config.before_initialize do # Configoro.paths << '/my/custom/path' # end def self.paths @paths ||= begin paths = [] paths << "#{Rails.root}/config/environments" if defined?(Rails) paths end end # Resets any custom configuration paths set using {.paths}. def self.reset_paths remove_instance_variable :@paths end # Loads the configuration for an environment and returns it as a {Hash}. Use # this method to access Configoro options outside the context of your Rails # app. You will need to configure paths first (see example). # # @param [String] env The Rails environment. # @return [Configoro::Hash] The configuration for that environment. # # @example Accessing Configoro options outside of Rails # Configoro.paths << "#{rails_root}/config/environments" # Configoro.load_environment(rails_env) #=> { ... } def self.load_environment(env) config = Configoro::Hash.new load_data config, env config end private def self.namespace Object.const_get Rails.application.class.to_s.split('::').first end def self.load_data(config, env) paths.each do |path| Dir.glob("#{path}/common/*.yml").sort.each { |file| config << file } Dir.glob("#{path}/#{env}/*.yml").sort.each { |file| config << file } end end end
SquareSquash/web/vendor/configoro/base.rb/0
{ "file_path": "SquareSquash/web/vendor/configoro/base.rb", "repo_id": "SquareSquash", "token_count": 721 }
133
<div class="form-group"> <div class="form-check"> <input class="form-check-input" type="checkbox" [attr.id]="controlId" [attr.aria-describedby]="describedById" [formControl]="internalControl" (blur)="onBlurInternal()" /> <label class="form-check-label" [attr.for]="controlId">{{ label }}</label> </div> <small *ngIf="showDescribedBy" [attr.id]="describedById" class="form-text text-muted">{{ helperText }}</small> </div>
bitwarden/web/bitwarden_license/src/app/organizations/components/input-checkbox.component.html/0
{ "file_path": "bitwarden/web/bitwarden_license/src/app/organizations/components/input-checkbox.component.html", "repo_id": "bitwarden", "token_count": 202 }
134
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="addTitle"> <div class="modal-dialog modal-dialog-scrollable" role="document"> <div class="modal-content"> <div class="modal-header"> <h2 class="modal-title" id="addTitle"> {{ "addExistingOrganization" | i18n }} </h2> <button type="button" class="close" data-dismiss="modal" appA11yTitle="{{ 'close' | i18n }}" > <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <div class="card-body text-center" *ngIf="loading"> <i class="bwi bwi-spinner bwi-spin" title="{{ 'loading' | i18n }}" aria-hidden="true"></i> {{ "loading" | i18n }} </div> <ng-container *ngIf="!loading"> <table class="table table-hover table-list"> <tr *ngFor="let o of organizations"> <td width="30"> <app-avatar [data]="o.name" size="25" [circle]="true" [fontSize]="14"></app-avatar> </td> <td> {{ o.name }} </td> <td> <button class="btn btn-outline-secondary pull-right" (click)="add(o)" [disabled]="formPromise" > Add </button> </td> </tr> </table> </ng-container> </div> </div> </div> </div>
bitwarden/web/bitwarden_license/src/app/providers/clients/add-organization.component.html/0
{ "file_path": "bitwarden/web/bitwarden_license/src/app/providers/clients/add-organization.component.html", "repo_id": "bitwarden", "token_count": 860 }
135
<div class="page-header d-flex"> <h1>{{ "people" | i18n }}</h1> <div class="ml-auto d-flex"> <div class="btn-group btn-group-sm" role="group"> <button type="button" class="btn btn-outline-secondary" [ngClass]="{ active: status == null }" (click)="filter(null)" > {{ "all" | i18n }} <span class="badge badge-pill badge-info" *ngIf="allCount">{{ allCount }}</span> </button> <button type="button" class="btn btn-outline-secondary" [ngClass]="{ active: status == userStatusType.Invited }" (click)="filter(userStatusType.Invited)" > {{ "invited" | i18n }} <span class="badge badge-pill badge-info" *ngIf="invitedCount">{{ invitedCount }}</span> </button> <button type="button" class="btn btn-outline-secondary" [ngClass]="{ active: status == userStatusType.Accepted }" (click)="filter(userStatusType.Accepted)" > {{ "accepted" | i18n }} <span class="badge badge-pill badge-warning" *ngIf="acceptedCount">{{ acceptedCount }}</span> </button> </div> <div class="ml-3"> <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> <div class="dropdown ml-3" appListDropdown> <button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" id="bulkActionsButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" appA11yTitle="{{ 'options' | i18n }}" > <i class="bwi bwi-cog" aria-hidden="true"></i> </button> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="bulkActionsButton"> <button class="dropdown-item" appStopClick (click)="bulkReinvite()"> <i class="bwi bwi-fw bwi-envelope" aria-hidden="true"></i> {{ "reinviteSelected" | i18n }} </button> <button class="dropdown-item text-success" appStopClick (click)="bulkConfirm()" *ngIf="showBulkConfirmUsers" > <i class="bwi bwi-fw bwi-check" aria-hidden="true"></i> {{ "confirmSelected" | i18n }} </button> <button class="dropdown-item text-danger" appStopClick (click)="bulkRemove()"> <i class="bwi bwi-fw bwi-close" aria-hidden="true"></i> {{ "remove" | i18n }} </button> <div class="dropdown-divider"></div> <button class="dropdown-item" appStopClick (click)="selectAll(true)"> <i class="bwi bwi-fw bwi-check-square" aria-hidden="true"></i> {{ "selectAll" | i18n }} </button> <button class="dropdown-item" appStopClick (click)="selectAll(false)"> <i class="bwi bwi-fw bwi-minus-square" aria-hidden="true"></i> {{ "unselectAll" | i18n }} </button> </div> </div> <button type="button" class="btn btn-sm btn-outline-primary ml-3" (click)="invite()"> <i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i> {{ "inviteUser" | 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 && (isPaging() ? pagedUsers : (users | search: searchText:'name':'email':'id')) as searchedUsers " > <p *ngIf="!searchedUsers.length">{{ "noUsersInList" | i18n }}</p> <ng-container *ngIf="searchedUsers.length"> <app-callout type="info" title="{{ 'confirmUsers' | i18n }}" icon="bwi bwi-check-circle" *ngIf="showConfirmUsers" > {{ "providerUsersNeedConfirmed" | i18n }} </app-callout> <table class="table table-hover table-list" infiniteScroll [infiniteScrollDistance]="1" [infiniteScrollDisabled]="!isPaging()" (scrolled)="loadMore()" > <tbody> <tr *ngFor="let u of searchedUsers"> <td (click)="checkUser(u)" class="table-list-checkbox"> <input type="checkbox" [(ngModel)]="u.checked" appStopProp /> </td> <td width="30"> <app-avatar [data]="u | userName" [email]="u.email" size="25" [circle]="true" [fontSize]="14" > </app-avatar> </td> <td> <a href="#" appStopClick (click)="edit(u)">{{ u.email }}</a> <span class="badge badge-secondary" *ngIf="u.status === userStatusType.Invited">{{ "invited" | i18n }}</span> <span class="badge badge-warning" *ngIf="u.status === userStatusType.Accepted">{{ "accepted" | i18n }}</span> <small class="text-muted d-block" *ngIf="u.name">{{ u.name }}</small> </td> <td> <ng-container *ngIf="u.twoFactorEnabled"> <i class="bwi bwi-lock" title="{{ 'userUsingTwoStep' | i18n }}" aria-hidden="true" ></i> <span class="sr-only">{{ "userUsingTwoStep" | i18n }}</span> </ng-container> </td> <td> <span *ngIf="u.type === userType.ProviderAdmin">{{ "providerAdmin" | i18n }}</span> <span *ngIf="u.type === userType.ServiceUser">{{ "serviceUser" | i18n }}</span> <span *ngIf="u.type === userType.Custom">{{ "custom" | i18n }}</span> </td> <td class="table-list-options"> <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" href="#" appStopClick (click)="reinvite(u)" *ngIf="u.status === userStatusType.Invited" > <i class="bwi bwi-fw bwi-envelope" aria-hidden="true"></i> {{ "resendInvitation" | i18n }} </a> <a class="dropdown-item text-success" href="#" appStopClick (click)="confirm(u)" *ngIf="u.status === userStatusType.Accepted" > <i class="bwi bwi-fw bwi-check" aria-hidden="true"></i> {{ "confirm" | i18n }} </a> <a class="dropdown-item" href="#" appStopClick (click)="groups(u)" *ngIf="accessGroups" > <i class="bwi bwi-fw bwi-sitemap" aria-hidden="true"></i> {{ "groups" | i18n }} </a> <a class="dropdown-item" href="#" appStopClick (click)="events(u)" *ngIf="accessEvents && u.status === userStatusType.Confirmed" > <i class="bwi bwi-fw bwi-file-text" aria-hidden="true"></i> {{ "eventLogs" | i18n }} </a> <a class="dropdown-item text-danger" href="#" appStopClick (click)="remove(u)"> <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 #addEdit></ng-template> <ng-template #eventsTemplate></ng-template> <ng-template #confirmTemplate></ng-template> <ng-template #bulkStatusTemplate></ng-template> <ng-template #bulkConfirmTemplate></ng-template> <ng-template #bulkRemoveTemplate></ng-template>
bitwarden/web/bitwarden_license/src/app/providers/manage/people.component.html/0
{ "file_path": "bitwarden/web/bitwarden_license/src/app/providers/manage/people.component.html", "repo_id": "bitwarden", "token_count": 4545 }
136
import { Component, OnInit } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; import { first } from "rxjs/operators"; 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 { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service"; import { SyncService } from "jslib-common/abstractions/sync.service"; import { ProviderSetupRequest } from "jslib-common/models/request/provider/providerSetupRequest"; @Component({ selector: "provider-setup", templateUrl: "setup.component.html", }) export class SetupComponent implements OnInit { loading = true; authed = false; email: string; formPromise: Promise<any>; providerId: string; token: string; name: string; billingEmail: string; constructor( private router: Router, private platformUtilsService: PlatformUtilsService, private i18nService: I18nService, private route: ActivatedRoute, private cryptoService: CryptoService, private apiService: ApiService, private syncService: SyncService, private validationService: ValidationService ) {} ngOnInit() { document.body.classList.remove("layout_frontend"); this.route.queryParams.pipe(first()).subscribe(async (qParams) => { const error = qParams.providerId == null || qParams.email == null || qParams.token == null; if (error) { this.platformUtilsService.showToast( "error", null, this.i18nService.t("emergencyInviteAcceptFailed"), { timeout: 10000 } ); this.router.navigate(["/"]); return; } this.providerId = qParams.providerId; this.token = qParams.token; // Check if provider exists, redirect if it does try { const provider = await this.apiService.getProvider(this.providerId); if (provider.name != null) { this.router.navigate(["/providers", provider.id], { replaceUrl: true }); } } catch (e) { this.validationService.showError(e); this.router.navigate(["/"]); } }); } async submit() { this.formPromise = this.doSubmit(); await this.formPromise; this.formPromise = null; } async doSubmit() { try { const shareKey = await this.cryptoService.makeShareKey(); const key = shareKey[0].encryptedString; const request = new ProviderSetupRequest(); request.name = this.name; request.billingEmail = this.billingEmail; request.token = this.token; request.key = key; const provider = await this.apiService.postProviderSetup(this.providerId, request); this.platformUtilsService.showToast("success", null, this.i18nService.t("providerSetup")); await this.syncService.fullSync(true); this.router.navigate(["/providers", provider.id]); } catch (e) { this.validationService.showError(e); } } }
bitwarden/web/bitwarden_license/src/app/providers/setup/setup.component.ts/0
{ "file_path": "bitwarden/web/bitwarden_license/src/app/providers/setup/setup.component.ts", "repo_id": "bitwarden", "token_count": 1163 }
137
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link href="/404/bootstrap.min.css" rel="stylesheet" type="text/css" integrity="sha384-hA/ESrxp2b05ywLtD9YwM6m+pNyLRY4+ruk6dWK00SM4k6SQs0bfrITJVSf6uZyH" /> <link href="/404/styles.css" rel="stylesheet" type="text/css" /> <link rel="apple-touch-icon" sizes="180x180" href="/images/icons/apple-touch-icon.png" /> <link rel="icon" type="image/png" sizes="32x32" href="/images/icons/favicon-32x32.png" /> <link rel="icon" type="image/png" sizes="16x16" href="/images/icons/favicon-16x16.png" /> <link rel="mask-icon" href="/images/icons/safari-pinned-tab.svg" color="#175DDC" /> <link rel="manifest" href="/manifest.json" /> <title>Page not found!</title> <meta name="description" content="404 Page Not Found" /> </head> <body> <div class="banner"> <div class="container inner banner"> <div class="row align-items-center"> <div class="col brand"> <i class="bwi bwi-shield"></i>&nbsp; <strong>bit</strong>warden </div> </div> </div> </div> <div class="container inner content"> <h2>Page not found!</h2> <p>Sorry, but the page you were looking for could not be found.</p> <p> <a href="/"> <img src="/images/404.png" class="img-fluid" alt="404 image" width="80%" /> </a> </p> <p> You can <a href="/">return to the web vault</a>, check our <a href="https://status.bitwarden.com/">status page</a> or <a href="https://bitwarden.com/contact/">contact us</a>. </p> </div> <div class="container footer text-muted content">© Copyright 2022 Bitwarden, Inc.</div> </body> </html>
bitwarden/web/src/404.html/0
{ "file_path": "bitwarden/web/src/404.html", "repo_id": "bitwarden", "token_count": 855 }
138
import { Component } from "@angular/core"; import { Router } from "@angular/router"; 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 { DeleteRecoverRequest } from "jslib-common/models/request/deleteRecoverRequest"; @Component({ selector: "app-recover-delete", templateUrl: "recover-delete.component.html", }) export class RecoverDeleteComponent { email: string; formPromise: Promise<any>; constructor( private router: Router, private apiService: ApiService, private platformUtilsService: PlatformUtilsService, private i18nService: I18nService, private logService: LogService ) {} async submit() { try { const request = new DeleteRecoverRequest(); request.email = this.email.trim().toLowerCase(); this.formPromise = this.apiService.postAccountRecoverDelete(request); await this.formPromise; this.platformUtilsService.showToast( "success", null, this.i18nService.t("deleteRecoverEmailSent") ); this.router.navigate(["/"]); } catch (e) { this.logService.error(e); } } }
bitwarden/web/src/app/accounts/recover-delete.component.ts/0
{ "file_path": "bitwarden/web/src/app/accounts/recover-delete.component.ts", "repo_id": "bitwarden", "token_count": 480 }
139
import { Component } from "@angular/core"; import { Router } from "@angular/router"; import { UpdatePasswordComponent as BaseUpdatePasswordComponent } from "jslib-angular/components/update-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 { UserVerificationService } from "jslib-common/abstractions/userVerification.service"; @Component({ selector: "app-update-password", templateUrl: "update-password.component.html", }) export class UpdatePasswordComponent extends BaseUpdatePasswordComponent { constructor( router: Router, i18nService: I18nService, platformUtilsService: PlatformUtilsService, passwordGenerationService: PasswordGenerationService, policyService: PolicyService, cryptoService: CryptoService, messagingService: MessagingService, apiService: ApiService, logService: LogService, stateService: StateService, userVerificationService: UserVerificationService ) { super( router, i18nService, platformUtilsService, passwordGenerationService, policyService, cryptoService, messagingService, apiService, stateService, userVerificationService, logService ); } }
bitwarden/web/src/app/accounts/update-password.component.ts/0
{ "file_path": "bitwarden/web/src/app/accounts/update-password.component.ts", "repo_id": "bitwarden", "token_count": 591 }
140
import { Component, Input, OnInit } from "@angular/core"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { OrganizationService } from "jslib-common/abstractions/organization.service"; import { Utils } from "jslib-common/misc/utils"; import { Organization } from "jslib-common/models/domain/organization"; import { NavigationPermissionsService } from "../organizations/services/navigation-permissions.service"; @Component({ selector: "app-organization-switcher", templateUrl: "organization-switcher.component.html", }) export class OrganizationSwitcherComponent implements OnInit { constructor(private organizationService: OrganizationService, private i18nService: I18nService) {} @Input() activeOrganization: Organization = null; organizations: Organization[] = []; loaded = false; async ngOnInit() { await this.load(); } async load() { const orgs = await this.organizationService.getAll(); this.organizations = orgs .filter((org) => NavigationPermissionsService.canAccessAdmin(org)) .sort(Utils.getSortFunction(this.i18nService, "name")); this.loaded = true; } }
bitwarden/web/src/app/components/organization-switcher.component.ts/0
{ "file_path": "bitwarden/web/src/app/components/organization-switcher.component.ts", "repo_id": "bitwarden", "token_count": 346 }
141
import { NgModule } from "@angular/core"; import { UserVerificationComponent } from "jslib-angular/components/user-verification.component"; import { AcceptEmergencyComponent } from "../accounts/accept-emergency.component"; import { AcceptOrganizationComponent } from "../accounts/accept-organization.component"; import { HintComponent } from "../accounts/hint.component"; import { LockComponent } from "../accounts/lock.component"; import { LoginComponent } from "../accounts/login.component"; import { RecoverDeleteComponent } from "../accounts/recover-delete.component"; import { RecoverTwoFactorComponent } from "../accounts/recover-two-factor.component"; import { RegisterComponent } from "../accounts/register.component"; import { RemovePasswordComponent } from "../accounts/remove-password.component"; import { SetPasswordComponent } from "../accounts/set-password.component"; import { SsoComponent } from "../accounts/sso.component"; import { TwoFactorOptionsComponent } from "../accounts/two-factor-options.component"; import { TwoFactorComponent } from "../accounts/two-factor.component"; import { UpdatePasswordComponent } from "../accounts/update-password.component"; import { UpdateTempPasswordComponent } from "../accounts/update-temp-password.component"; import { VerifyEmailTokenComponent } from "../accounts/verify-email-token.component"; import { VerifyRecoverDeleteComponent } from "../accounts/verify-recover-delete.component"; import { NestedCheckboxComponent } from "../components/nested-checkbox.component"; import { OrganizationSwitcherComponent } from "../components/organization-switcher.component"; import { PasswordRepromptComponent } from "../components/password-reprompt.component"; import { PasswordStrengthComponent } from "../components/password-strength.component"; import { PremiumBadgeComponent } from "../components/premium-badge.component"; import { FooterComponent } from "../layouts/footer.component"; import { FrontendLayoutComponent } from "../layouts/frontend-layout.component"; import { NavbarComponent } from "../layouts/navbar.component"; import { UserLayoutComponent } from "../layouts/user-layout.component"; import { OrganizationLayoutComponent } from "../organizations/layouts/organization-layout.component"; import { BulkConfirmComponent as OrgBulkConfirmComponent } from "../organizations/manage/bulk/bulk-confirm.component"; import { BulkRemoveComponent as OrgBulkRemoveComponent } from "../organizations/manage/bulk/bulk-remove.component"; import { BulkStatusComponent as OrgBulkStatusComponent } from "../organizations/manage/bulk/bulk-status.component"; import { CollectionAddEditComponent as OrgCollectionAddEditComponent } from "../organizations/manage/collection-add-edit.component"; import { CollectionsComponent as OrgManageCollectionsComponent } from "../organizations/manage/collections.component"; import { EntityEventsComponent as OrgEntityEventsComponent } from "../organizations/manage/entity-events.component"; import { EventsComponent as OrgEventsComponent } from "../organizations/manage/events.component"; import { GroupAddEditComponent as OrgGroupAddEditComponent } from "../organizations/manage/group-add-edit.component"; import { GroupsComponent as OrgGroupsComponent } from "../organizations/manage/groups.component"; import { ManageComponent as OrgManageComponent } from "../organizations/manage/manage.component"; import { PeopleComponent as OrgPeopleComponent } from "../organizations/manage/people.component"; import { PoliciesComponent as OrgPoliciesComponent } from "../organizations/manage/policies.component"; import { PolicyEditComponent as OrgPolicyEditComponent } from "../organizations/manage/policy-edit.component"; import { ResetPasswordComponent as OrgResetPasswordComponent } from "../organizations/manage/reset-password.component"; import { UserAddEditComponent as OrgUserAddEditComponent } from "../organizations/manage/user-add-edit.component"; import { UserConfirmComponent as OrgUserConfirmComponent } from "../organizations/manage/user-confirm.component"; import { UserGroupsComponent as OrgUserGroupsComponent } from "../organizations/manage/user-groups.component"; import { DisableSendPolicyComponent } from "../organizations/policies/disable-send.component"; import { MasterPasswordPolicyComponent } from "../organizations/policies/master-password.component"; import { PasswordGeneratorPolicyComponent } from "../organizations/policies/password-generator.component"; import { PersonalOwnershipPolicyComponent } from "../organizations/policies/personal-ownership.component"; import { RequireSsoPolicyComponent } from "../organizations/policies/require-sso.component"; import { ResetPasswordPolicyComponent } from "../organizations/policies/reset-password.component"; import { SendOptionsPolicyComponent } from "../organizations/policies/send-options.component"; import { SingleOrgPolicyComponent } from "../organizations/policies/single-org.component"; import { TwoFactorAuthenticationPolicyComponent } from "../organizations/policies/two-factor-authentication.component"; import { AccountComponent as OrgAccountComponent } from "../organizations/settings/account.component"; import { AdjustSubscription } from "../organizations/settings/adjust-subscription.component"; import { BillingSyncApiKeyComponent } from "../organizations/settings/billing-sync-api-key.component"; import { ChangePlanComponent } from "../organizations/settings/change-plan.component"; import { DeleteOrganizationComponent } from "../organizations/settings/delete-organization.component"; import { DownloadLicenseComponent } from "../organizations/settings/download-license.component"; import { ImageSubscriptionHiddenComponent as OrgSubscriptionHiddenComponent } from "../organizations/settings/image-subscription-hidden.component"; import { OrganizationBillingComponent } from "../organizations/settings/organization-billing.component"; import { OrganizationSubscriptionComponent } from "../organizations/settings/organization-subscription.component"; import { SettingsComponent as OrgSettingComponent } from "../organizations/settings/settings.component"; import { TwoFactorSetupComponent as OrgTwoFactorSetupComponent } from "../organizations/settings/two-factor-setup.component"; import { AcceptFamilySponsorshipComponent } from "../organizations/sponsorships/accept-family-sponsorship.component"; import { FamiliesForEnterpriseSetupComponent } from "../organizations/sponsorships/families-for-enterprise-setup.component"; import { ExportComponent as OrgExportComponent } from "../organizations/tools/export.component"; import { ExposedPasswordsReportComponent as OrgExposedPasswordsReportComponent } from "../organizations/tools/exposed-passwords-report.component"; import { ImportComponent as OrgImportComponent } from "../organizations/tools/import.component"; import { InactiveTwoFactorReportComponent as OrgInactiveTwoFactorReportComponent } from "../organizations/tools/inactive-two-factor-report.component"; import { ReusedPasswordsReportComponent as OrgReusedPasswordsReportComponent } from "../organizations/tools/reused-passwords-report.component"; import { ToolsComponent as OrgToolsComponent } from "../organizations/tools/tools.component"; import { UnsecuredWebsitesReportComponent as OrgUnsecuredWebsitesReportComponent } from "../organizations/tools/unsecured-websites-report.component"; import { WeakPasswordsReportComponent as OrgWeakPasswordsReportComponent } from "../organizations/tools/weak-passwords-report.component"; import { AddEditComponent as OrgAddEditComponent } from "../organizations/vault/add-edit.component"; import { AttachmentsComponent as OrgAttachmentsComponent } from "../organizations/vault/attachments.component"; import { CiphersComponent as OrgCiphersComponent } from "../organizations/vault/ciphers.component"; import { CollectionsComponent as OrgCollectionsComponent } from "../organizations/vault/collections.component"; import { ProvidersComponent } from "../providers/providers.component"; import { BreachReportComponent } from "../reports/breach-report.component"; import { ExposedPasswordsReportComponent } from "../reports/exposed-passwords-report.component"; import { InactiveTwoFactorReportComponent } from "../reports/inactive-two-factor-report.component"; import { ReportCardComponent } from "../reports/report-card.component"; import { ReportListComponent } from "../reports/report-list.component"; import { ReportsComponent } from "../reports/reports.component"; import { ReusedPasswordsReportComponent } from "../reports/reused-passwords-report.component"; import { UnsecuredWebsitesReportComponent } from "../reports/unsecured-websites-report.component"; import { WeakPasswordsReportComponent } from "../reports/weak-passwords-report.component"; import { AccessComponent } from "../send/access.component"; import { AddEditComponent as SendAddEditComponent } from "../send/add-edit.component"; import { EffluxDatesComponent as SendEffluxDatesComponent } from "../send/efflux-dates.component"; import { SendComponent } from "../send/send.component"; import { AccountComponent } from "../settings/account.component"; import { AddCreditComponent } from "../settings/add-credit.component"; import { AdjustPaymentComponent } from "../settings/adjust-payment.component"; import { AdjustStorageComponent } from "../settings/adjust-storage.component"; import { ApiKeyComponent } from "../settings/api-key.component"; import { BillingSyncKeyComponent } from "../settings/billing-sync-key.component"; import { ChangeEmailComponent } from "../settings/change-email.component"; import { ChangeKdfComponent } from "../settings/change-kdf.component"; import { ChangePasswordComponent } from "../settings/change-password.component"; import { CreateOrganizationComponent } from "../settings/create-organization.component"; import { DeauthorizeSessionsComponent } from "../settings/deauthorize-sessions.component"; import { DeleteAccountComponent } from "../settings/delete-account.component"; import { DomainRulesComponent } from "../settings/domain-rules.component"; import { EmergencyAccessAddEditComponent } from "../settings/emergency-access-add-edit.component"; import { EmergencyAccessAttachmentsComponent } from "../settings/emergency-access-attachments.component"; import { EmergencyAccessConfirmComponent } from "../settings/emergency-access-confirm.component"; import { EmergencyAccessTakeoverComponent } from "../settings/emergency-access-takeover.component"; import { EmergencyAccessViewComponent } from "../settings/emergency-access-view.component"; import { EmergencyAccessComponent } from "../settings/emergency-access.component"; import { EmergencyAddEditComponent } from "../settings/emergency-add-edit.component"; import { OrganizationPlansComponent } from "../settings/organization-plans.component"; import { PaymentMethodComponent } from "../settings/payment-method.component"; import { PaymentComponent } from "../settings/payment.component"; import { PreferencesComponent } from "../settings/preferences.component"; import { PremiumComponent } from "../settings/premium.component"; import { ProfileComponent } from "../settings/profile.component"; import { PurgeVaultComponent } from "../settings/purge-vault.component"; import { SecurityKeysComponent } from "../settings/security-keys.component"; import { SecurityComponent } from "../settings/security.component"; import { SettingsComponent } from "../settings/settings.component"; import { SponsoredFamiliesComponent } from "../settings/sponsored-families.component"; import { SponsoringOrgRowComponent } from "../settings/sponsoring-org-row.component"; import { SubscriptionComponent } from "../settings/subscription.component"; import { TaxInfoComponent } from "../settings/tax-info.component"; import { TwoFactorAuthenticatorComponent } from "../settings/two-factor-authenticator.component"; import { TwoFactorDuoComponent } from "../settings/two-factor-duo.component"; import { TwoFactorEmailComponent } from "../settings/two-factor-email.component"; import { TwoFactorRecoveryComponent } from "../settings/two-factor-recovery.component"; import { TwoFactorSetupComponent } from "../settings/two-factor-setup.component"; import { TwoFactorVerifyComponent } from "../settings/two-factor-verify.component"; import { TwoFactorWebAuthnComponent } from "../settings/two-factor-webauthn.component"; import { TwoFactorYubiKeyComponent } from "../settings/two-factor-yubikey.component"; import { UpdateKeyComponent } from "../settings/update-key.component"; import { UpdateLicenseComponent } from "../settings/update-license.component"; import { UserBillingHistoryComponent } from "../settings/user-billing-history.component"; import { UserSubscriptionComponent } from "../settings/user-subscription.component"; import { VaultTimeoutInputComponent } from "../settings/vault-timeout-input.component"; import { VerifyEmailComponent } from "../settings/verify-email.component"; import { ExportComponent } from "../tools/export.component"; import { GeneratorComponent } from "../tools/generator.component"; import { ImportComponent } from "../tools/import.component"; import { PasswordGeneratorHistoryComponent } from "../tools/password-generator-history.component"; import { ToolsComponent } from "../tools/tools.component"; import { AddEditCustomFieldsComponent } from "../vault/add-edit-custom-fields.component"; import { AddEditComponent } from "../vault/add-edit.component"; import { AttachmentsComponent } from "../vault/attachments.component"; import { BulkActionsComponent } from "../vault/bulk-actions.component"; import { BulkDeleteComponent } from "../vault/bulk-delete.component"; import { BulkMoveComponent } from "../vault/bulk-move.component"; import { BulkRestoreComponent } from "../vault/bulk-restore.component"; import { BulkShareComponent } from "../vault/bulk-share.component"; import { CiphersComponent } from "../vault/ciphers.component"; import { CollectionsComponent } from "../vault/collections.component"; import { FolderAddEditComponent } from "../vault/folder-add-edit.component"; import { ShareComponent } from "../vault/share.component"; import { PipesModule } from "./pipes/pipes.module"; import { SharedModule } from "./shared.module"; import { VaultFilterModule } from "./vault-filter/vault-filter.module"; import { OrganizationBadgeModule } from "./vault/modules/organization-badge/organization-badge.module"; // Please do not add to this list of declarations - we should refactor these into modules when doing so makes sense until there are none left. // If you are building new functionality, please create or extend a feature module instead. @NgModule({ imports: [SharedModule, VaultFilterModule, OrganizationBadgeModule, PipesModule], declarations: [ PremiumBadgeComponent, AcceptEmergencyComponent, AcceptFamilySponsorshipComponent, AcceptOrganizationComponent, AccessComponent, AccountComponent, AddCreditComponent, AddEditComponent, AddEditCustomFieldsComponent, AddEditCustomFieldsComponent, AdjustPaymentComponent, AdjustStorageComponent, AdjustSubscription, ApiKeyComponent, AttachmentsComponent, BillingSyncApiKeyComponent, BillingSyncKeyComponent, BreachReportComponent, BulkActionsComponent, BulkDeleteComponent, BulkMoveComponent, BulkRestoreComponent, BulkShareComponent, ChangeEmailComponent, ChangeKdfComponent, ChangePasswordComponent, ChangePlanComponent, CiphersComponent, CollectionsComponent, CreateOrganizationComponent, DeauthorizeSessionsComponent, DeleteAccountComponent, DeleteOrganizationComponent, DisableSendPolicyComponent, DomainRulesComponent, DownloadLicenseComponent, EmergencyAccessAddEditComponent, EmergencyAccessAttachmentsComponent, EmergencyAccessComponent, EmergencyAccessConfirmComponent, EmergencyAccessTakeoverComponent, EmergencyAccessViewComponent, EmergencyAddEditComponent, ExportComponent, ExposedPasswordsReportComponent, FamiliesForEnterpriseSetupComponent, FolderAddEditComponent, FooterComponent, FrontendLayoutComponent, HintComponent, ImportComponent, InactiveTwoFactorReportComponent, LockComponent, LoginComponent, MasterPasswordPolicyComponent, NavbarComponent, NestedCheckboxComponent, OrganizationSwitcherComponent, OrgAccountComponent, OrgAddEditComponent, OrganizationBillingComponent, OrganizationLayoutComponent, OrganizationPlansComponent, OrganizationSubscriptionComponent, OrgAttachmentsComponent, OrgBulkConfirmComponent, OrgBulkRemoveComponent, OrgBulkStatusComponent, OrgCiphersComponent, OrgCollectionAddEditComponent, OrgCollectionsComponent, OrgEntityEventsComponent, OrgEventsComponent, OrgExportComponent, OrgExposedPasswordsReportComponent, OrgGroupAddEditComponent, OrgGroupsComponent, OrgImportComponent, OrgInactiveTwoFactorReportComponent, OrgManageCollectionsComponent, OrgManageComponent, OrgPeopleComponent, OrgPoliciesComponent, OrgPolicyEditComponent, OrgResetPasswordComponent, OrgReusedPasswordsReportComponent, OrgSettingComponent, OrgToolsComponent, OrgTwoFactorSetupComponent, OrgSubscriptionHiddenComponent, OrgUnsecuredWebsitesReportComponent, OrgUserAddEditComponent, OrgUserConfirmComponent, OrgUserGroupsComponent, OrgWeakPasswordsReportComponent, GeneratorComponent, PasswordGeneratorHistoryComponent, PasswordGeneratorPolicyComponent, PasswordRepromptComponent, PasswordStrengthComponent, PaymentComponent, PaymentMethodComponent, PersonalOwnershipPolicyComponent, PreferencesComponent, PremiumBadgeComponent, PremiumComponent, ProfileComponent, ProvidersComponent, PurgeVaultComponent, RecoverDeleteComponent, RecoverTwoFactorComponent, RegisterComponent, RemovePasswordComponent, ReportCardComponent, ReportListComponent, ReportsComponent, RequireSsoPolicyComponent, ResetPasswordPolicyComponent, ReusedPasswordsReportComponent, SecurityComponent, SecurityKeysComponent, SendAddEditComponent, SendComponent, SendEffluxDatesComponent, SendOptionsPolicyComponent, SetPasswordComponent, SettingsComponent, ShareComponent, SingleOrgPolicyComponent, SponsoredFamiliesComponent, SponsoringOrgRowComponent, SsoComponent, SubscriptionComponent, TaxInfoComponent, ToolsComponent, TwoFactorAuthenticationPolicyComponent, TwoFactorAuthenticatorComponent, TwoFactorComponent, TwoFactorDuoComponent, TwoFactorEmailComponent, TwoFactorOptionsComponent, TwoFactorRecoveryComponent, TwoFactorSetupComponent, TwoFactorVerifyComponent, TwoFactorWebAuthnComponent, TwoFactorYubiKeyComponent, UnsecuredWebsitesReportComponent, UpdateKeyComponent, UpdateLicenseComponent, UpdatePasswordComponent, UpdateTempPasswordComponent, UserBillingHistoryComponent, UserLayoutComponent, UserSubscriptionComponent, UserVerificationComponent, VaultTimeoutInputComponent, VerifyEmailComponent, VerifyEmailTokenComponent, VerifyRecoverDeleteComponent, WeakPasswordsReportComponent, ], exports: [ PremiumBadgeComponent, AcceptEmergencyComponent, AcceptOrganizationComponent, AccessComponent, AccountComponent, AddCreditComponent, AddEditComponent, AddEditCustomFieldsComponent, AddEditCustomFieldsComponent, AdjustPaymentComponent, AdjustStorageComponent, AdjustSubscription, ApiKeyComponent, AttachmentsComponent, BreachReportComponent, BulkActionsComponent, BulkDeleteComponent, BulkMoveComponent, BulkRestoreComponent, BulkShareComponent, ChangeEmailComponent, ChangeKdfComponent, ChangePasswordComponent, ChangePlanComponent, CiphersComponent, CollectionsComponent, CreateOrganizationComponent, DeauthorizeSessionsComponent, DeleteAccountComponent, DeleteOrganizationComponent, DisableSendPolicyComponent, DomainRulesComponent, DownloadLicenseComponent, EmergencyAccessAddEditComponent, EmergencyAccessAttachmentsComponent, EmergencyAccessComponent, EmergencyAccessConfirmComponent, EmergencyAccessTakeoverComponent, EmergencyAccessViewComponent, EmergencyAddEditComponent, ExportComponent, ExposedPasswordsReportComponent, FamiliesForEnterpriseSetupComponent, FolderAddEditComponent, FooterComponent, FrontendLayoutComponent, HintComponent, ImportComponent, InactiveTwoFactorReportComponent, LockComponent, LoginComponent, MasterPasswordPolicyComponent, NavbarComponent, NestedCheckboxComponent, OrganizationSwitcherComponent, OrgAccountComponent, OrgAddEditComponent, OrganizationBillingComponent, OrganizationLayoutComponent, OrganizationPlansComponent, OrganizationSubscriptionComponent, OrgAttachmentsComponent, OrgBulkConfirmComponent, OrgBulkRemoveComponent, OrgBulkStatusComponent, OrgCiphersComponent, OrgCollectionAddEditComponent, OrgCollectionsComponent, OrgEntityEventsComponent, OrgEventsComponent, OrgExportComponent, OrgExposedPasswordsReportComponent, OrgGroupAddEditComponent, OrgGroupsComponent, OrgImportComponent, OrgInactiveTwoFactorReportComponent, OrgManageCollectionsComponent, OrgManageComponent, OrgPeopleComponent, OrgPoliciesComponent, OrgPolicyEditComponent, OrgResetPasswordComponent, OrgReusedPasswordsReportComponent, OrgSettingComponent, OrgToolsComponent, OrgTwoFactorSetupComponent, OrgUnsecuredWebsitesReportComponent, OrgUserAddEditComponent, OrgUserConfirmComponent, OrgUserGroupsComponent, OrgWeakPasswordsReportComponent, GeneratorComponent, PasswordGeneratorHistoryComponent, PasswordGeneratorPolicyComponent, PasswordRepromptComponent, PasswordStrengthComponent, PaymentComponent, PaymentMethodComponent, PersonalOwnershipPolicyComponent, PreferencesComponent, PremiumBadgeComponent, PremiumComponent, ProfileComponent, ProvidersComponent, PurgeVaultComponent, RecoverDeleteComponent, RecoverTwoFactorComponent, RegisterComponent, RemovePasswordComponent, ReportCardComponent, ReportListComponent, ReportsComponent, RequireSsoPolicyComponent, ResetPasswordPolicyComponent, ReusedPasswordsReportComponent, SecurityComponent, SecurityKeysComponent, SendAddEditComponent, SendComponent, SendEffluxDatesComponent, SendOptionsPolicyComponent, SetPasswordComponent, SettingsComponent, ShareComponent, SingleOrgPolicyComponent, SponsoredFamiliesComponent, SponsoringOrgRowComponent, SsoComponent, SubscriptionComponent, TaxInfoComponent, ToolsComponent, TwoFactorAuthenticationPolicyComponent, TwoFactorAuthenticatorComponent, TwoFactorComponent, TwoFactorDuoComponent, TwoFactorEmailComponent, TwoFactorOptionsComponent, TwoFactorRecoveryComponent, TwoFactorSetupComponent, TwoFactorVerifyComponent, TwoFactorWebAuthnComponent, TwoFactorYubiKeyComponent, UnsecuredWebsitesReportComponent, UpdateKeyComponent, UpdateLicenseComponent, UpdatePasswordComponent, UpdateTempPasswordComponent, UserBillingHistoryComponent, UserLayoutComponent, UserSubscriptionComponent, UserVerificationComponent, VaultTimeoutInputComponent, VerifyEmailComponent, VerifyEmailTokenComponent, VerifyRecoverDeleteComponent, WeakPasswordsReportComponent, ], }) export class LooseComponentsModule {}
bitwarden/web/src/app/modules/loose-components.module.ts/0
{ "file_path": "bitwarden/web/src/app/modules/loose-components.module.ts", "repo_id": "bitwarden", "token_count": 6701 }
142
<ng-container *ngIf="!hide"> <ng-container [ngSwitch]="displayMode"> <ng-container *ngSwitchCase="'noOrganizations'"> <ul class="filter-options"> <li class="filter-option active"> <span class="filter-buttons"> <button class="filter-button"> <i class="bwi bwi-fw bwi-user" aria-hidden="true"></i> {{ "myVault" | i18n }} </button> </span> </li> <li class="filter-option"> <span class="filter-buttons"> <a href="#" routerLink="/create-organization" class="filter-button"> <i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i> &nbsp;{{ "newOrganization" | i18n }} </a> </span> </li> </ul> </ng-container> <ng-container *ngSwitchCase="'personalOwnershipPolicy'"> <div class="filter-heading"> <button (click)="toggleCollapse()" title="{{ 'toggleCollapse' | i18n }}" class="toggle-button" [attr.aria-expanded]="!isCollapsed" aria-controls="organization-filters" > <i class="bwi bwi-fw" aria-hidden="true" [ngClass]="{ 'bwi-angle-right': isCollapsed, 'bwi-angle-down': !isCollapsed }" ></i> </button> <button class="filter-button" (click)="clearFilter()" [ngClass]="{ active: !hasActiveFilter }" > &nbsp;{{ organizationGrouping.name | i18n }} </button> </div> <ul id="organization-filters" *ngIf="!isCollapsed" class="filter-options"> <li class="filter-option" *ngFor="let organization of organizations" [ngClass]="{ active: organization.id === activeFilter.selectedOrganizationId }" > <span class="filter-buttons"> <button class="filter-button" (click)="applyOrganizationFilter(organization)"> <i class="bwi bwi-fw bwi-business" aria-hidden="true"></i> {{ organization.name }} </button> <ng-container *ngIf="organization.id === activeFilter.selectedOrganizationId"> <button [bitMenuTriggerFor]="orgMenu" class="org-options ml-auto"> <i class="bwi bwi-ellipsis-v" aria-hidden="true"></i> </button> <bit-menu class="filter-organization-options" #orgMenu> <app-organization-options [organization]="organization"></app-organization-options> </bit-menu> </ng-container> </span> </li> <li class="filter-option"> <span class="filter-buttons"> <a href="#" routerLink="/create-organization" class="filter-button"> <i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i> &nbsp;{{ "newOrganization" | i18n }} </a> </span> </li> </ul> </ng-container> <ng-container *ngSwitchCase="'singleOrganizationAndPersonalOwnershipPolicies'"> <div class="filter-heading"> <button class="filter-button active"> <i class="bwi bwi-fw bwi-business" aria-hidden="true"></i> {{ organizations[0].name }} </button> </div> </ng-container> <ng-container *ngSwitchDefault> <div class="filter-heading"> <button class="toggle-button" title="{{ 'toggleCollapse' | i18n }}" (click)="toggleCollapse()" [attr.aria-expanded]="!isCollapsed" aria-controls="organization-filters" > <i class="bwi bwi-fw" aria-hidden="true" [ngClass]="{ 'bwi-angle-right': isCollapsed, 'bwi-angle-down': !isCollapsed }" ></i> </button> <button class="filter-button" (click)="clearFilter()" [ngClass]="{ active: !hasActiveFilter }" > &nbsp;{{ organizationGrouping.name | i18n }} </button> </div> <ul id="organization-filters" *ngIf="!isCollapsed" class="filter-options"> <li class="filter-option" [ngClass]="{ active: activeFilter.myVaultOnly }"> <span class="filter-buttons"> <button class="filter-button" (click)="applyMyVaultFilter()"> <i class="bwi bwi-fw bwi-user" aria-hidden="true"></i> {{ "myVault" | i18n }} </button> </span> </li> <li class="filter-option" *ngFor="let organization of organizations" [ngClass]="{ active: organization.id === activeFilter.selectedOrganizationId }" > <span class="filter-buttons"> <button class="filter-button" (click)="applyOrganizationFilter(organization)"> <i class="bwi bwi-fw bwi-business" aria-hidden="true"></i> {{ organization.name }} </button> <ng-container> <button [bitMenuTriggerFor]="orgMenu" class="org-options ml-auto"> <i class="bwi bwi-ellipsis-v" aria-hidden="true"></i> </button> <bit-menu class="filter-organization-options" #orgMenu> <app-organization-options [organization]="organization"></app-organization-options> </bit-menu> </ng-container> </span> </li> <li class="filter-option" *ngIf="!(displayMode === 'singleOrganizationPolicy')"> <span class="filter-buttons"> <a href="#" routerLink="/create-organization" class="filter-button"> <i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i> &nbsp;{{ "newOrganization" | i18n }} </a> </span> </li> </ul> </ng-container> </ng-container> <hr /> </ng-container>
bitwarden/web/src/app/modules/vault-filter/components/organization-filter.component.html/0
{ "file_path": "bitwarden/web/src/app/modules/vault-filter/components/organization-filter.component.html", "repo_id": "bitwarden", "token_count": 2990 }
143
import { NgModule } from "@angular/core"; import { VaultModule } from "../../vault.module"; import { IndividualVaultRoutingModule } from "./individual-vault-routing.module"; import { IndividualVaultComponent } from "./individual-vault.component"; @NgModule({ imports: [VaultModule, IndividualVaultRoutingModule], declarations: [IndividualVaultComponent], exports: [IndividualVaultComponent], }) export class IndividualVaultModule {}
bitwarden/web/src/app/modules/vault/modules/individual-vault/individual-vault.module.ts/0
{ "file_path": "bitwarden/web/src/app/modules/vault/modules/individual-vault/individual-vault.module.ts", "repo_id": "bitwarden", "token_count": 123 }
144
import { Component, Input } from "@angular/core"; import { ApiService } from "jslib-common/abstractions/api.service"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { OrganizationUserBulkRequest } from "jslib-common/models/request/organizationUserBulkRequest"; import { BulkUserDetails } from "./bulk-status.component"; @Component({ selector: "app-bulk-remove", templateUrl: "bulk-remove.component.html", }) export class BulkRemoveComponent { @Input() organizationId: string; @Input() users: BulkUserDetails[]; statuses: Map<string, string> = new Map(); loading = false; done = false; error: string; constructor(protected apiService: ApiService, protected i18nService: I18nService) {} async submit() { this.loading = true; try { const response = await this.deleteUsers(); response.data.forEach((entry) => { const error = entry.error !== "" ? entry.error : this.i18nService.t("bulkRemovedMessage"); this.statuses.set(entry.id, error); }); this.done = true; } catch (e) { this.error = e.message; } this.loading = false; } protected async deleteUsers() { const request = new OrganizationUserBulkRequest(this.users.map((user) => user.id)); return await this.apiService.deleteManyOrganizationUsers(this.organizationId, request); } }
bitwarden/web/src/app/organizations/manage/bulk/bulk-remove.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/manage/bulk/bulk-remove.component.ts", "repo_id": "bitwarden", "token_count": 466 }
145
import { Component, OnInit } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { OrganizationService } from "jslib-common/abstractions/organization.service"; import { Organization } from "jslib-common/models/domain/organization"; @Component({ selector: "app-org-manage", templateUrl: "manage.component.html", }) export class ManageComponent implements OnInit { organization: Organization; accessPolicies = false; accessGroups = false; accessEvents = false; accessSso = false; constructor(private route: ActivatedRoute, private organizationService: OrganizationService) {} ngOnInit() { this.route.parent.params.subscribe(async (params) => { this.organization = await this.organizationService.get(params.organizationId); this.accessPolicies = this.organization.usePolicies; this.accessSso = this.organization.useSso; this.accessEvents = this.organization.useEvents; this.accessGroups = this.organization.useGroups; }); } }
bitwarden/web/src/app/organizations/manage/manage.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/manage/manage.component.ts", "repo_id": "bitwarden", "token_count": 320 }
146
import { Directive, Input, OnInit } from "@angular/core"; import { FormControl, FormGroup } from "@angular/forms"; import { PolicyType } from "jslib-common/enums/policyType"; import { Organization } from "jslib-common/models/domain/organization"; import { PolicyRequest } from "jslib-common/models/request/policyRequest"; import { PolicyResponse } from "jslib-common/models/response/policyResponse"; export abstract class BasePolicy { abstract name: string; abstract description: string; abstract type: PolicyType; abstract component: any; display(organization: Organization) { return true; } } @Directive() export abstract class BasePolicyComponent implements OnInit { @Input() policyResponse: PolicyResponse; @Input() policy: BasePolicy; enabled = new FormControl(false); data: FormGroup = null; ngOnInit(): void { this.enabled.setValue(this.policyResponse.enabled); if (this.policyResponse.data != null) { this.loadData(); } } loadData() { this.data.patchValue(this.policyResponse.data ?? {}); } buildRequestData() { if (this.data != null) { return this.data.value; } return null; } buildRequest(policiesEnabledMap: Map<PolicyType, boolean>) { const request = new PolicyRequest(); request.enabled = this.enabled.value; request.type = this.policy.type; request.data = this.buildRequestData(); return Promise.resolve(request); } }
bitwarden/web/src/app/organizations/policies/base-policy.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/policies/base-policy.component.ts", "repo_id": "bitwarden", "token_count": 457 }
147
import { Component } from "@angular/core"; import { I18nService } from "jslib-common/abstractions/i18n.service"; import { PolicyType } from "jslib-common/enums/policyType"; import { PolicyRequest } from "jslib-common/models/request/policyRequest"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; export class SingleOrgPolicy extends BasePolicy { name = "singleOrg"; description = "singleOrgDesc"; type = PolicyType.SingleOrg; component = SingleOrgPolicyComponent; } @Component({ selector: "policy-single-org", templateUrl: "single-org.component.html", }) export class SingleOrgPolicyComponent extends BasePolicyComponent { constructor(private i18nService: I18nService) { super(); } buildRequest(policiesEnabledMap: Map<PolicyType, boolean>): Promise<PolicyRequest> { if (!this.enabled.value) { if (policiesEnabledMap.get(PolicyType.RequireSso) ?? false) { throw new Error( this.i18nService.t("disableRequiredError", this.i18nService.t("requireSso")) ); } if (policiesEnabledMap.get(PolicyType.MaximumVaultTimeout) ?? false) { throw new Error( this.i18nService.t("disableRequiredError", this.i18nService.t("maximumVaultTimeoutLabel")) ); } } return super.buildRequest(policiesEnabledMap); } }
bitwarden/web/src/app/organizations/policies/single-org.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/policies/single-org.component.ts", "repo_id": "bitwarden", "token_count": 467 }
148
import { Component } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { ModalService } from "jslib-angular/services/modal.service"; import { CipherService } from "jslib-common/abstractions/cipher.service"; import { LogService } from "jslib-common/abstractions/log.service"; import { MessagingService } from "jslib-common/abstractions/messaging.service"; import { OrganizationService } from "jslib-common/abstractions/organization.service"; import { PasswordRepromptService } from "jslib-common/abstractions/passwordReprompt.service"; import { StateService } from "jslib-common/abstractions/state.service"; import { CipherView } from "jslib-common/models/view/cipherView"; import { InactiveTwoFactorReportComponent as BaseInactiveTwoFactorReportComponent } from "../../reports/inactive-two-factor-report.component"; @Component({ selector: "app-inactive-two-factor-report", templateUrl: "../../reports/inactive-two-factor-report.component.html", }) export class InactiveTwoFactorReportComponent extends BaseInactiveTwoFactorReportComponent { constructor( cipherService: CipherService, modalService: ModalService, messagingService: MessagingService, stateService: StateService, private route: ActivatedRoute, logService: LogService, passwordRepromptService: PasswordRepromptService, private organizationService: OrganizationService ) { super( cipherService, modalService, messagingService, stateService, logService, passwordRepromptService ); } async ngOnInit() { this.route.parent.parent.params.subscribe(async (params) => { this.organization = await this.organizationService.get(params.organizationId); await super.ngOnInit(); }); } getAllCiphers(): Promise<CipherView[]> { return this.cipherService.getAllFromApiForOrganization(this.organization.id); } }
bitwarden/web/src/app/organizations/tools/inactive-two-factor-report.component.ts/0
{ "file_path": "bitwarden/web/src/app/organizations/tools/inactive-two-factor-report.component.ts", "repo_id": "bitwarden", "token_count": 603 }
149
import { Component, OnInit } from "@angular/core"; import { AuditService } from "jslib-common/abstractions/audit.service"; import { StateService } from "jslib-common/abstractions/state.service"; import { BreachAccountResponse } from "jslib-common/models/response/breachAccountResponse"; @Component({ selector: "app-breach-report", templateUrl: "breach-report.component.html", }) export class BreachReportComponent implements OnInit { error = false; username: string; checkedUsername: string; breachedAccounts: BreachAccountResponse[] = []; formPromise: Promise<BreachAccountResponse[]>; constructor(private auditService: AuditService, private stateService: StateService) {} async ngOnInit() { this.username = await this.stateService.getEmail(); } async submit() { this.error = false; this.username = this.username.toLowerCase(); try { this.formPromise = this.auditService.breachedAccounts(this.username); this.breachedAccounts = await this.formPromise; } catch { this.error = true; } this.checkedUsername = this.username; } }
bitwarden/web/src/app/reports/breach-report.component.ts/0
{ "file_path": "bitwarden/web/src/app/reports/breach-report.component.ts", "repo_id": "bitwarden", "token_count": 350 }
150