Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2021-08-28 20:17:19 +0300
committerAleksander Machniak <alec@alec.pl>2021-08-28 20:17:19 +0300
commitcb37d14c5c50129e993937bb612159a0978af1c9 (patch)
tree47ec4555ccedd0d3a6ea3fd8d260c8c5b4e31479 /skins
parentde74c656ceb4e00ae7aefe8a29cb63cae912edb8 (diff)
Support responses (snippets) in HTML format (#5315)
Diffstat (limited to 'skins')
-rw-r--r--skins/classic/templates/compose.html1
-rw-r--r--skins/elastic/styles/widgets/editor.less5
-rw-r--r--skins/elastic/templates/compose.html1
-rw-r--r--skins/elastic/ui.js9
-rw-r--r--skins/larry/templates/compose.html1
5 files changed, 10 insertions, 7 deletions
diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html
index c64f655a9..81d14db82 100644
--- a/skins/classic/templates/compose.html
+++ b/skins/classic/templates/compose.html
@@ -211,7 +211,6 @@
<li><label class="comment"><roundcube:label name="insertresponse" /></label></li>
<roundcube:object name="responseslist" id="responseslist" tagname="ul" itemclass="active" />
<li><label class="comment"><roundcube:label name="manageresponses" /></label></li>
- <roundcube:button command="save-response" type="link-menuitem" label="newresponse" classAct="active" unselectable="on" />
<roundcube:button name="responses" type="link-menuitem" label="editresponses" class="active" onclick="return rcmail.command('switch-task', 'settings/responses')" />
</ul>
</div>
diff --git a/skins/elastic/styles/widgets/editor.less b/skins/elastic/styles/widgets/editor.less
index fab88001b..6c5ff43d1 100644
--- a/skins/elastic/styles/widgets/editor.less
+++ b/skins/elastic/styles/widgets/editor.less
@@ -451,6 +451,11 @@ div.tox {
width: 34px;
line-height: 28px;
}
+
+ &[disabled] {
+ opacity: .7;
+ cursor: not-allowed;
+ }
}
}
diff --git a/skins/elastic/templates/compose.html b/skins/elastic/templates/compose.html
index f52ab6782..6dafb7e5e 100644
--- a/skins/elastic/templates/compose.html
+++ b/skins/elastic/templates/compose.html
@@ -242,7 +242,6 @@
<li role="separator" class="separator"><label><roundcube:label name="insertresponse" /></label></li>
<roundcube:object name="responseslist" id="responseslist" tagname="ul" class="rounded-0" itemclass="active" list-placeholder="noresponsesavailable" />
<li role="separator" class="separator"><label><roundcube:label name="manageresponses" /></label></li>
- <roundcube:button command="save-response" type="link-menuitem" label="newresponse" class="create responses disabled" classAct="create responses active" unselectable="on" />
<roundcube:button name="responses" type="link-menuitem" label="editresponses" class="edit responses active" onclick="return rcmail.command('switch-task', 'settings/responses')" />
</ul>
</div>
diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js
index 7ed918180..699936e6a 100644
--- a/skins/elastic/ui.js
+++ b/skins/elastic/ui.js
@@ -3773,11 +3773,11 @@ function rcube_elastic_ui()
};
/**
- * HTML editor textarea wrapper with nice looking tabs-like switch
+ * HTML editor textarea wrapper with plain-to-html switch button
*/
function html_editor_init(obj)
{
- // Here we support two structures
+ // Here we support two kinds of structure:
// 1. <div><textarea></textarea><select class="hidden"></div>
// 2. <tr><td><td><td><textarea></textarea></td></tr>
// <tr><td><td><td><input type="checkbox"></td></tr>
@@ -3785,10 +3785,11 @@ function rcube_elastic_ui()
var sw, is_table = false,
editor = $(obj),
parent = editor.parent(),
+ readonly = editor.is('[readonly],[disabled]'),
plain_btn = $('<a class="mce-i-html" href="#" tabindex="-1"></a>')
- .attr('title', rcmail.gettext('htmltoggle'))
+ .attr({title: rcmail.gettext('htmltoggle'), disabled: readonly})
.on('click', function(e) {
- if (rcmail.command('toggle-editor', {id: editor.attr('id'), html: true}, '', e.originalEvent)) {
+ if (!readonly && rcmail.command('toggle-editor', {id: editor.attr('id'), html: true}, '', e.originalEvent)) {
parent.addClass('ishtml');
}
})
diff --git a/skins/larry/templates/compose.html b/skins/larry/templates/compose.html
index 2d3fefd60..53d009c07 100644
--- a/skins/larry/templates/compose.html
+++ b/skins/larry/templates/compose.html
@@ -212,7 +212,6 @@
<li role="separator" class="separator" id=""><label><roundcube:label name="insertresponse" /></label></li>
<roundcube:object name="responseslist" id="responseslist" tagname="ul" itemclass="active" list-placeholder="noresponsesavailable" />
<li role="separator" class="separator"><label><roundcube:label name="manageresponses" /></label></li>
- <roundcube:button command="save-response" type="link-menuitem" label="newresponse" classAct="active" unselectable="on" />
<roundcube:button name="responses" type="link-menuitem" label="editresponses" class="active" onclick="return rcmail.command('switch-task', 'settings/responses')" />
</ul>
</div>