*/
public static function getDepths(FluidbookPublication $fluidbook)
{
- $options = ['interactive', 'inline'];
+ $options = ['interactive', 'inline', 'target'];
$combi = [];
$configs = [];
foreach (self::types() as $type) {
{
- "name": "FluidbookToolboxDev",
+ "name": "FluidbookToolbox",
"lockfileVersion": 3,
"requires": true,
"packages": {
"select2": "^4.1.0-rc.0",
"select2-bootstrap-theme": "^0.1.0-beta.10",
"spectrum-colorpicker": "^1.8.1",
+ "tippy": "^0.0.0",
"tippy.js": "^6.3.7"
},
"devDependencies": {
"node": ">=0.6.0"
}
},
+ "node_modules/tippy": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/tippy/-/tippy-0.0.0.tgz",
+ "integrity": "sha512-GOrE/mzoeL4t7Q2Bky+7efOZJKH3W95DZIUez+nUns37jHf8R9PEupuEx9F7HolxX+0fzzpKfas2N+LIlYHXAA=="
+ },
"node_modules/tippy.js": {
"version": "6.3.7",
"resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz",
"select2": "^4.1.0-rc.0",
"select2-bootstrap-theme": "^0.1.0-beta.10",
"spectrum-colorpicker": "^1.8.1",
+ "tippy": "^0.0.0",
"tippy.js": "^6.3.7"
}
}
initTooltips: function () {
$('[data-tooltip]:not(.init-tooltip)').each(function () {
- tippy($(this).get(0), {content: $(this).data('tooltip')});
+ let i = tippy($(this).get(0), {content: $(this).data('tooltip')});
+ $(this).addClass('init-tooltip');
+ $(this).data('tippyinstance', i)
});
- $(this).addClass('init-tooltip');
},
initEvents: function () {
$this.linkeditor.form.updateLinkForm();
});
+ $(document).on('click', '#linkeditor-panel-layers label span.uid', function () {
+ navigator.clipboard.writeText($(this).attr('fb-uid'));
+ let tippy=$(this).data('tippyinstance');
+ console.log(tippy);
+ tippy.setContent(TRANSLATIONS.id_copied);
+ tippy.show();
+ return false;
+ });
+
this.update();
},
if (dest === '') {
dest = '<em>' + TRANSLATIONS.empty + '</em>';
}
- var l = '<label class="layer" fb-type="' + type + '"><input name="' + $(this).attr('fb-uid') + '" type="checkbox"> ' + dest + '</label>';
+ var l = '<label class="layer" fb-type="' + type + '"><input name="' + $(this).attr('fb-uid') + '" type="checkbox"> ' + dest + '<span data-tooltip="' + TRANSLATIONS.click_to_copy_id + '" data-uid="' + $(this).attr('fb-uid') + '" class="uid">#' + $(this).attr('fb-uid') + '</span></label>';
let level = Math.floor(parseInt($(this).attr('fb-calc-depth')) / 10);
layers.push({
level: level,
this.updateSelection();
+ this.linkeditor.initTooltips();
},
updateSelection() {
padding: 3px 10px
font-style: italic
font-weight: 500
- background-color: rgba(0,0,0,0.45)
+ background-color: rgba(0, 0, 0, 0.45)
color: $color-dark
@include dark-theme
- background-color: rgba(255,255,255,0.45)
+ background-color: rgba(255, 255, 255, 0.45)
color: $color
label
border-bottom: 1px solid currentColor
padding: 5px 10px
cursor: pointer
+ position: relative
+
+ span
+ display: inline-block
+ position: absolute
+ right: 4px
+ background-color: rgba(255, 255, 255, 0.5)
+ color: #000
+ border-radius: 2px
+ padding: 2px
+ font-family: "Courier New", Courier, monospace
input
color: #fff
'cover_doublepage_1'=>__('Recouvrir la double-page avec une marge de :margin',['margin'=>'1px']),
'n_links_copied'=>__('%nb% liens copiés'),
'n_links_cut'=>__('%nb% liens coupés'),
+ 'click_to_copy_id'=>__('Cliquer pour copier l\'identifiant du lien'),
+ 'id_copied'=>__('Identifiant copié !'),
];
$rulers=!count($rulers)?'{}':json_encode($rulers);