[MERGE] forward port branch saas-11.1 up to 7e469eb77a
This commit is contained in:
@@ -3,25 +3,26 @@
|
||||
# * web_editor
|
||||
#
|
||||
# Translators:
|
||||
# Jeffery CHEN <jeffery9@gmail.com>, 2016
|
||||
# fausthuang <faust_huang@hotmail.com>, 2016
|
||||
# Jeffery CHEN Fan <jeffery9@gmail.com>, 2016
|
||||
# fausthuang, 2016
|
||||
# Xia Fajin <xia.fajin@elico-corp.com>, 2016
|
||||
# Xu Lei <xulei8@qq.com>, 2016
|
||||
# Talway <9010446@qq.com>, 2016
|
||||
# Martin Trigaux <mat@odoo.com>, 2016
|
||||
# Martin Trigaux, 2016
|
||||
# liAnGjiA <liangjia@qq.com>, 2016
|
||||
# SHOM <shanmuxin@yeah.net>, 2016
|
||||
# mrshelly <mrshelly@hotmail.com>, 2016
|
||||
# Gary Wei <Gary.wei@elico-corp.com>, 2016
|
||||
# THL <wt39181819@gmail.com>, 2016
|
||||
# waveyeung <waveyeung@qq.com>, 2016
|
||||
# 山西清水欧度(QQ:54773801) <54773801@qq.com>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.saas~18\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-09-20 09:54+0000\n"
|
||||
"PO-Revision-Date: 2017-09-20 09:54+0000\n"
|
||||
"Last-Translator: waveyeung <waveyeung@qq.com>, 2016\n"
|
||||
"Last-Translator: 山西清水欧度(QQ:54773801) <54773801@qq.com>, 2018\n"
|
||||
"Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -51,7 +52,7 @@ msgstr "25% 黑"
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
msgid "25% White"
|
||||
msgstr ""
|
||||
msgstr "25% 白"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -85,14 +86,14 @@ msgstr "<i class=\"fa fa-th-large\"/> 首个面板"
|
||||
msgid ""
|
||||
"A server error occured. Please check you correctly signed in and that the "
|
||||
"file you are saving is well-formed."
|
||||
msgstr ""
|
||||
msgstr "服务器发生错误。 请检查您是否正确登录,并且保存的文件格式正确。"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "Accepts"
|
||||
msgstr ""
|
||||
msgstr " 接受"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -144,7 +145,7 @@ msgstr "居右"
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
msgid "Alpha"
|
||||
msgstr ""
|
||||
msgstr "Alpha"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -158,7 +159,7 @@ msgstr "替代上传"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:315
|
||||
#, python-format
|
||||
msgid "Assign a focal point that will always be visible"
|
||||
msgstr ""
|
||||
msgstr "指定一个总是可见的焦点"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.model.fields,field_description:web_editor.field_ir_attachment_local_url
|
||||
@@ -232,7 +233,7 @@ msgstr "背景宽度"
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
msgid "Beta"
|
||||
msgstr ""
|
||||
msgstr "Beta"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -258,7 +259,7 @@ msgstr "加粗"
|
||||
#: code:addons/web_editor/static/src/js/widgets/ace.js:827
|
||||
#, python-format
|
||||
msgid "Careful !"
|
||||
msgstr ""
|
||||
msgstr "小心!"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -337,7 +338,7 @@ msgstr "待翻译的内容"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:194
|
||||
#, python-format
|
||||
msgid "Copy-paste your URL or embed code here"
|
||||
msgstr ""
|
||||
msgstr "复制粘贴您的URL或在这里嵌入代码"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -375,7 +376,7 @@ msgstr "定制"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "Dailymotion"
|
||||
msgstr ""
|
||||
msgstr "Dailymotion"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -394,7 +395,7 @@ msgstr "默认"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:387
|
||||
#, python-format
|
||||
msgid "Define if/how the background image will be repeated"
|
||||
msgstr ""
|
||||
msgstr "定义背景图像是否重复"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -413,7 +414,7 @@ msgstr "说明"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:34
|
||||
#, python-format
|
||||
msgid "Description (alt tag)"
|
||||
msgstr ""
|
||||
msgstr "描述(ALT标签)"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -483,14 +484,14 @@ msgstr "编辑"
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
msgid "Epsilon"
|
||||
msgstr ""
|
||||
msgstr "Epsilon"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/js/widgets/ace.js:93
|
||||
#, python-format
|
||||
msgid "Expected "
|
||||
msgstr ""
|
||||
msgstr "预期"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -572,7 +573,7 @@ msgstr "全屏"
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
msgid "Gamma"
|
||||
msgstr ""
|
||||
msgstr "Gamma"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -587,7 +588,7 @@ msgstr "深灰"
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
msgid "Gray Darker"
|
||||
msgstr ""
|
||||
msgstr "暗灰色"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -597,7 +598,7 @@ msgstr "浅灰"
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
msgid "Gray Lighter"
|
||||
msgstr ""
|
||||
msgstr "亮灰色"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.model,name:web_editor.model_ir_http
|
||||
@@ -665,35 +666,35 @@ msgstr "这是用来帮助你提高翻译效率的可视化工具:"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:219
|
||||
#, python-format
|
||||
msgid "Hide Dailymotion logo"
|
||||
msgstr ""
|
||||
msgstr "隐藏Dailymotion标志"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:216
|
||||
#, python-format
|
||||
msgid "Hide Youtube logo"
|
||||
msgstr ""
|
||||
msgstr "隐藏Youtube标志"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:213
|
||||
#, python-format
|
||||
msgid "Hide fullscreen button"
|
||||
msgstr ""
|
||||
msgstr "隐藏全屏按钮"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:210
|
||||
#, python-format
|
||||
msgid "Hide player controls"
|
||||
msgstr ""
|
||||
msgstr "隐藏播放器控件"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:222
|
||||
#, python-format
|
||||
msgid "Hide sharing button"
|
||||
msgstr ""
|
||||
msgstr "隐藏分享按钮"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -714,7 +715,7 @@ msgstr "ID"
|
||||
msgid ""
|
||||
"If you discard the current edition, all unsaved changes will be lost. You "
|
||||
"can cancel to return to the edition mode."
|
||||
msgstr ""
|
||||
msgstr "如果放弃当前版本,则所有未保存的更改都将丢失。 您可以取消返回到编辑模式。"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -723,7 +724,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"If you reset this file, all your customizations will be lost as it will be "
|
||||
"reverted to the default file."
|
||||
msgstr ""
|
||||
msgstr "如果您重置此文件,所有您的自定义将丢失,因为它将被还原为默认文件。"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -746,14 +747,14 @@ msgstr "图像网址"
|
||||
msgid ""
|
||||
"In this mode, you can only translate texts. To change the structure of the page, you must edit the master page.\n"
|
||||
" Each modification on the master page is automatically applied to all translated versions."
|
||||
msgstr ""
|
||||
msgstr "在这种模式下,您只能翻译文本。若要更改页的结构,必须编辑母版页。 母版页上的每一项修改都会自动应用于所有已翻译的版本。"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/ace.xml:23
|
||||
#, python-format
|
||||
msgid "Include All LESS Files"
|
||||
msgstr ""
|
||||
msgstr "包括所有LESS文件"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -807,7 +808,7 @@ msgstr "插入视频"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "Instagram"
|
||||
msgstr ""
|
||||
msgstr "Instagram"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -842,7 +843,7 @@ msgstr "键盘快捷键"
|
||||
#: code:addons/web_editor/static/src/xml/ace.xml:11
|
||||
#, python-format
|
||||
msgid "LESS (CSS)"
|
||||
msgstr ""
|
||||
msgstr "LESS (CSS)"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -872,7 +873,7 @@ msgstr "最后更新时间"
|
||||
#: code:addons/web_editor/static/src/js/widgets/ace.js:360
|
||||
#, python-format
|
||||
msgid "Less file: %s"
|
||||
msgstr ""
|
||||
msgstr "Less 文件: %s"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -907,7 +908,7 @@ msgstr "链接到"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:207
|
||||
#, python-format
|
||||
msgid "Loop"
|
||||
msgstr ""
|
||||
msgstr "循环"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -971,7 +972,7 @@ msgstr "确定"
|
||||
#: code:addons/web_editor/static/src/js/editor/translator.js:93
|
||||
#, python-format
|
||||
msgid "Ok, never show me this again"
|
||||
msgstr ""
|
||||
msgstr "好了, 别再给我看这个"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1043,7 +1044,7 @@ msgstr "预览"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:57
|
||||
#, python-format
|
||||
msgid "Previous"
|
||||
msgstr ""
|
||||
msgstr "以前"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -1154,7 +1155,7 @@ msgstr "设置为默认"
|
||||
#: code:addons/web_editor/static/src/js/widgets/ace.js:485
|
||||
#, python-format
|
||||
msgid "Reseting views is not supported yet"
|
||||
msgstr ""
|
||||
msgstr "不支持重置视图"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1212,7 +1213,7 @@ msgstr "搜索联系人"
|
||||
#: code:addons/web_editor/static/src/xml/snippets.xml:17
|
||||
#, python-format
|
||||
msgid "Select Parent Container"
|
||||
msgstr ""
|
||||
msgstr "选择父容器"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1240,14 +1241,14 @@ msgstr "从文件中选择"
|
||||
#: code:addons/web_editor/static/src/js/widgets/ace.js:567
|
||||
#, python-format
|
||||
msgid "Server error"
|
||||
msgstr ""
|
||||
msgstr "服务器错误"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:365
|
||||
#, python-format
|
||||
msgid "Set the starting position of the background image."
|
||||
msgstr ""
|
||||
msgstr "设置背景图像的起始位置。"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1263,7 +1264,7 @@ msgstr "设置透明"
|
||||
msgid ""
|
||||
"Sets the width and height of the background image in percent of the parent "
|
||||
"element."
|
||||
msgstr ""
|
||||
msgstr "设置背景图像的宽度和高度,以父元素的百分比表示。"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1371,21 +1372,21 @@ msgstr ""
|
||||
#: code:addons/web_editor/static/src/js/widgets/widgets.js:871
|
||||
#, python-format
|
||||
msgid "The provided url does not reference any supported video"
|
||||
msgstr ""
|
||||
msgstr "提供的网址不存在任何支持的视频"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/js/widgets/widgets.js:865
|
||||
#, python-format
|
||||
msgid "The provided url is not valid"
|
||||
msgstr ""
|
||||
msgstr "提供的网址无效"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/js/editor/rte.summernote.js:53
|
||||
#, python-format
|
||||
msgid "Theme colors"
|
||||
msgstr ""
|
||||
msgstr "主题颜色"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1428,7 +1429,7 @@ msgstr "已翻译的内容"
|
||||
#: code:addons/web_editor/static/src/js/editor/translator.js:91
|
||||
#, python-format
|
||||
msgid "Translation Info"
|
||||
msgstr ""
|
||||
msgstr "翻译信息"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1443,7 +1444,7 @@ msgstr "透明"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:248
|
||||
#, python-format
|
||||
msgid "URL or Email"
|
||||
msgstr ""
|
||||
msgstr "网址或电子邮件"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1464,7 +1465,7 @@ msgstr "取消"
|
||||
#: code:addons/web_editor/static/src/js/widgets/ace.js:86
|
||||
#, python-format
|
||||
msgid "Unexpected "
|
||||
msgstr ""
|
||||
msgstr "意外"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1535,21 +1536,21 @@ msgstr "视频网址?"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:193
|
||||
#, python-format
|
||||
msgid "Video code"
|
||||
msgstr ""
|
||||
msgstr "视频代码"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "Vimeo"
|
||||
msgstr ""
|
||||
msgstr "Vimeo"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "Vine.co"
|
||||
msgstr ""
|
||||
msgstr "Vine.co"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.ui.view,arch_db:web_editor.colorpicker
|
||||
@@ -1567,7 +1568,7 @@ msgstr "白"
|
||||
#: code:addons/web_editor/static/src/xml/ace.xml:10
|
||||
#, python-format
|
||||
msgid "XML (HTML)"
|
||||
msgstr ""
|
||||
msgstr "XML (HTML)"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1588,14 +1589,14 @@ msgstr "你将进入翻译模式。"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "Youku"
|
||||
msgstr ""
|
||||
msgstr "Youku"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "Youtube"
|
||||
msgstr ""
|
||||
msgstr "Youtube"
|
||||
|
||||
#. module: web_editor
|
||||
#. openerp-web
|
||||
@@ -1619,7 +1620,7 @@ msgstr "自动"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:113
|
||||
#, python-format
|
||||
msgid "https://www.odoo.com/logo.png"
|
||||
msgstr ""
|
||||
msgstr "https://www.odoo.com/logo.png"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.model,name:web_editor.model_ir_attachment
|
||||
@@ -1721,7 +1722,7 @@ msgstr "ir.ui.view"
|
||||
#: code:addons/web_editor/static/src/xml/editor.xml:198
|
||||
#, python-format
|
||||
msgid "videos"
|
||||
msgstr ""
|
||||
msgstr "视频"
|
||||
|
||||
#. module: web_editor
|
||||
#: model:ir.model,name:web_editor.model_web_editor_converter_test
|
||||
|
||||
@@ -409,7 +409,19 @@ var FieldTextHtml = AbstractField.extend({
|
||||
var layoutInfo = self.editor.rte.editable().data('layoutInfo');
|
||||
$.summernote.pluginEvents.codeview(undefined, undefined, layoutInfo, false);
|
||||
}
|
||||
var $ancestors = self.$iframe.filter(':not(:visible)').parentsUntil(':visible').addBack();
|
||||
var ancestorsStyle = [];
|
||||
// temporarily force displaying iframe (needed for firefox)
|
||||
_.each($ancestors, function (el) {
|
||||
var $el = $(el);
|
||||
ancestorsStyle.unshift($el.attr('style') || null);
|
||||
$el.css({display: 'initial', visibility: 'hidden', height: 1});
|
||||
});
|
||||
self.editor.snippetsMenu && self.editor.snippetsMenu.cleanForSave();
|
||||
_.each($ancestors, function (el) {
|
||||
var $el = $(el);
|
||||
$el.attr('style', ancestorsStyle.pop());
|
||||
});
|
||||
self._setValue(self.$content.html());
|
||||
});
|
||||
},
|
||||
|
||||
@@ -281,8 +281,10 @@ var RTEWidget = Widget.extend({
|
||||
.each(function () {
|
||||
var $node = $(this);
|
||||
|
||||
// fallback for firefox iframe display:none see https://github.com/odoo/odoo/pull/22610
|
||||
var computedStyles = window.getComputedStyle(this) || window.parent.getComputedStyle(this);
|
||||
// add class to display inline-block for empty t-field
|
||||
if (window.getComputedStyle(this).display === 'inline' && $node.data('oe-type') !== 'image') {
|
||||
if (computedStyles.display === 'inline' && $node.data('oe-type') !== 'image') {
|
||||
$node.addClass('o_is_inline_editable');
|
||||
}
|
||||
});
|
||||
@@ -651,26 +653,16 @@ var RTEWidget = Widget.extend({
|
||||
self.historyRecordUndo($target, 'activate', true);
|
||||
});
|
||||
|
||||
// To Fix Google Chrome Tripleclick Issue, which selects the ending
|
||||
// whitespace characters (so Tripleclicking then typing text will remove
|
||||
// the whole paragraph instead of its content).
|
||||
// http://stackoverflow.com/questions/38467334/why-does-google-chrome-always-add-space-after-selected-text
|
||||
if ($.browser.chrome === true && ev.originalEvent.detail === 3) {
|
||||
var currentSelection = range.create();
|
||||
if (currentSelection.sc.parentNode === currentSelection.ec) {
|
||||
_selectSC(currentSelection);
|
||||
} else if (currentSelection.eo === 0) {
|
||||
var $hasNext = $(currentSelection.sc).parent();
|
||||
while (!$hasNext.next().length && !$hasNext.is('body')) {
|
||||
$hasNext = $hasNext.parent();
|
||||
}
|
||||
if ($hasNext.next()[0] === currentSelection.ec) {
|
||||
_selectSC(currentSelection);
|
||||
}
|
||||
}
|
||||
}
|
||||
function _selectSC(selection) {
|
||||
range.create(selection.sc, selection.so, selection.sc, selection.sc.length).select();
|
||||
// Browsers select different content from one to another after a
|
||||
// triple click (especially: if triple-clicking on a paragraph on
|
||||
// Chrome, blank characters of the element following the paragraph are
|
||||
// selected too)
|
||||
//
|
||||
// The triple click behavior is reimplemented for all browsers here
|
||||
if (ev.originalEvent.detail === 3) {
|
||||
// Select the whole content inside the deepest DOM element that was
|
||||
// triple-clicked
|
||||
range.create(ev.target, 0, ev.target, ev.target.childNodes.length).select();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -421,6 +421,9 @@ dom.isImg = function (node) {
|
||||
};
|
||||
var fn_is_forbidden_node = dom.isForbiddenNode || function () {};
|
||||
dom.isForbiddenNode = function (node) {
|
||||
if (node.tagName === "BR") {
|
||||
return false;
|
||||
}
|
||||
return fn_is_forbidden_node(node) || $(node).is(".media_iframe_video");
|
||||
};
|
||||
var fn_is_img_font = dom.isImgFont || function () {};
|
||||
|
||||
@@ -694,10 +694,16 @@ dom.isRemovableEmptyNode = function (node) {
|
||||
dom.isForbiddenNode = function (node) {
|
||||
return node.tagName === "BR" || $(node).is(".fa, img");
|
||||
};
|
||||
dom.listBetween = function (sc, ec) {
|
||||
/**
|
||||
* @todo 'so' and 'eo' were added as a bugfix and are not given everytime. They
|
||||
* however should be as the function may be wrong without them (for example,
|
||||
* when asking the list between an element and its parent, as there is no path
|
||||
* from the beginning of the former to the beginning of the later).
|
||||
*/
|
||||
dom.listBetween = function (sc, ec, so, eo) {
|
||||
var nodes = [];
|
||||
var ancestor = dom.commonAncestor(sc, ec);
|
||||
dom.walkPoint({'node': sc, 'offset': 0}, {'node': ec, 'offset': 0}, function (point) {
|
||||
dom.walkPoint({'node': sc, 'offset': so || 0}, {'node': ec, 'offset': eo || 0}, function (point) {
|
||||
if (ancestor !== point.node || ancestor === sc || ancestor === ec) {
|
||||
nodes.push(point.node);
|
||||
}
|
||||
@@ -1869,7 +1875,7 @@ $.summernote.pluginEvents.formatBlock = function (event, editor, layoutInfo, sTa
|
||||
}
|
||||
|
||||
// fix by odoo because if you select a style in a li with no p tag all the ul is wrapped by the style tag
|
||||
var nodes = dom.listBetween(r.sc, r.ec);
|
||||
var nodes = dom.listBetween(r.sc, r.ec, r.so, r.eo);
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
if (dom.isBR(nodes[i]) || (dom.isText(nodes[i]) && dom.isVisibleText(nodes[i])) || dom.isB(nodes[i]) || dom.isU(nodes[i]) || dom.isS(nodes[i]) || dom.isI(nodes[i]) || dom.isFont(nodes[i])) {
|
||||
var ancestor = dom.ancestor(nodes[i], isFormatNode);
|
||||
@@ -1984,6 +1990,14 @@ eventHandler.modules.editor.currentStyle = function (target) {
|
||||
if (r)
|
||||
styleInfo.image = r.isOnImg();
|
||||
}
|
||||
// Fix when the target is a link: the text-align buttons state should
|
||||
// indicate the alignment of the link in the parent, not the text inside
|
||||
// the link (which is not possible to customize with summernote). Summernote fixed
|
||||
// this in their newest version... by just not showing the active button
|
||||
// for alignments.
|
||||
if (styleInfo.anchor) {
|
||||
styleInfo['text-align'] = $(styleInfo.anchor).parent().css('text-align');
|
||||
}
|
||||
return styleInfo;
|
||||
};
|
||||
|
||||
|
||||
@@ -742,7 +742,7 @@ var ViewEditor = Widget.extend({
|
||||
|
||||
var text = data.text || '';
|
||||
if (!isSelected) {
|
||||
text = Array($elem.data('level')).join('-') + ' ' + text;
|
||||
text = Array($elem.data('level') + 1).join('-') + ' ' + text;
|
||||
}
|
||||
var $div = $('<div/>', {
|
||||
text: text,
|
||||
|
||||
@@ -136,12 +136,12 @@ QUnit.test('field html_frame widget', function (assert) {
|
||||
model: 'mass.mailing',
|
||||
data: this.data,
|
||||
arch: '<form string="Partners">' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/test\'}"/>' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/logo\'}"/>' +
|
||||
'</form>',
|
||||
res_id: 1,
|
||||
session: {user_context: {lang: "en_us"}},
|
||||
mockRPC: function (route) {
|
||||
if (_.str.startsWith(route, '/test')) {
|
||||
if (_.str.startsWith(route, '/logo')) {
|
||||
// those tests will be executed twice, once in readonly and once in edit
|
||||
assert.ok(route.search('model=mass.mailing') > 0,
|
||||
"the route should specify the correct model");
|
||||
@@ -200,7 +200,7 @@ QUnit.test('html_frame does not crash when saving in readonly', function (assert
|
||||
data: this.data,
|
||||
arch: '<form string="Partners">' +
|
||||
'<sheet>' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/test\'}"/>' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/logo\'}"/>' +
|
||||
'</sheet>' +
|
||||
'</form>',
|
||||
res_id: 1,
|
||||
@@ -208,7 +208,7 @@ QUnit.test('html_frame does not crash when saving in readonly', function (assert
|
||||
if (args.method) {
|
||||
assert.step(args.method);
|
||||
}
|
||||
if (_.str.startsWith(route, '/test')) {
|
||||
if (_.str.startsWith(route, '/logo')) {
|
||||
// manually call the callback to simulate that the iframe has
|
||||
// been loaded (note: just the content, not the editor)
|
||||
window.odoo[$.deparam(route).callback + '_content'].call();
|
||||
@@ -237,7 +237,7 @@ QUnit.test('html_frame does not crash when saving in edit mode (editor not loade
|
||||
arch: '<form string="Partners">' +
|
||||
'<sheet>' +
|
||||
'<field name="display_name"/>' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/test\'}"/>' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/logo\'}"/>' +
|
||||
'</sheet>' +
|
||||
'</form>',
|
||||
res_id: 1,
|
||||
@@ -245,7 +245,7 @@ QUnit.test('html_frame does not crash when saving in edit mode (editor not loade
|
||||
if (args.method) {
|
||||
assert.step(args.method);
|
||||
}
|
||||
if (_.str.startsWith(route, '/test')) {
|
||||
if (_.str.startsWith(route, '/logo')) {
|
||||
// manually call the callback to simulate that the iframe has
|
||||
// been partially loaded (just the content, not the editor)
|
||||
window.odoo[$.deparam(route).callback + '_content']();
|
||||
@@ -279,7 +279,7 @@ QUnit.test('html_frame saving in edit mode (editor and content fully loaded)', f
|
||||
arch: '<form string="Partners">' +
|
||||
'<sheet>' +
|
||||
'<field name="display_name"/>' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/test\'}"/>' +
|
||||
'<field name="body" widget="html_frame" options="{\'editor_url\': \'/logo\'}"/>' +
|
||||
'</sheet>' +
|
||||
'</form>',
|
||||
res_id: 1,
|
||||
@@ -290,7 +290,7 @@ QUnit.test('html_frame saving in edit mode (editor and content fully loaded)', f
|
||||
writeDeferred.resolve();
|
||||
}
|
||||
}
|
||||
if (_.str.startsWith(route, '/test')) {
|
||||
if (_.str.startsWith(route, '/logo')) {
|
||||
// manually call the callback to simulate that the iframe has
|
||||
// been fully loaded (content + editor)
|
||||
var callback = $.deparam(route).callback;
|
||||
|
||||
Reference in New Issue
Block a user