mirror of https://github.com/xwiki-labs/cryptpad
add missing font-awesome share icon to the safe link hint
This commit is contained in:
parent
2a6afcc176
commit
9cac465b08
|
@ -117,6 +117,18 @@ define([
|
|||
|
||||
var create = {};
|
||||
|
||||
var SPECIAL_HINTS_HANDLER = {
|
||||
safeLinks: function () {
|
||||
return $('<span>', {'class': 'cp-sidebarlayout-description'})
|
||||
.html(Messages._getKey('settings_safeLinksHint', ['<span class="fa fa-shhare-alt"></span>']));
|
||||
},
|
||||
};
|
||||
|
||||
var DEFAULT_HINT_HANDLER = function (safeKey) {
|
||||
return $('<span>', {'class': 'cp-sidebarlayout-description'})
|
||||
.text(Messages['settings_'+safeKey+'Hint'] || 'Coming soon...');
|
||||
};
|
||||
|
||||
var makeBlock = function (key, getter, full) {
|
||||
var safeKey = key.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
|
||||
|
||||
|
@ -124,8 +136,14 @@ define([
|
|||
var $div = $('<div>', {'class': 'cp-settings-' + key + ' cp-sidebarlayout-element'});
|
||||
if (full) {
|
||||
$('<label>').text(Messages['settings_'+safeKey+'Title'] || key).appendTo($div);
|
||||
$('<span>', {'class': 'cp-sidebarlayout-description'})
|
||||
.text(Messages['settings_'+safeKey+'Hint'] || 'Coming soon...').appendTo($div);
|
||||
|
||||
// if this block's hint needs a special renderer, then create it in SPECIAL_HINTS_HANLDER
|
||||
// otherwise the default will be used
|
||||
var hintFunction = (typeof(SPECIAL_HINTS_HANDLER[safeKey]) === 'function')?
|
||||
SPECIAL_HINTS_HANDLER[safeKey]:
|
||||
DEFAULT_HINT_HANDLER;
|
||||
|
||||
hintFunction(safeKey).appendTo($div);
|
||||
}
|
||||
getter(function (content) {
|
||||
$div.append(content);
|
||||
|
|
Loading…
Reference in New Issue