forked from Wavyzz/dolibarr
Debug feature copy-paste on smarpthone
This commit is contained in:
@@ -222,9 +222,9 @@ print 'jQuery(\'.clipboardCPShowOnHover\').hover(
|
||||
$(this).children(".clipboardCPButton, .clipboardCPText").hide();
|
||||
}
|
||||
);';
|
||||
print 'jQuery(\'.clipboardCPButton\').click(function() {
|
||||
print 'jQuery(\'.clipboardCPButton, .clipboardCPValueToPrint\').click(function() {
|
||||
/* console.log(this.parentNode); */
|
||||
console.log("We click on a clipboardCPButton tag");
|
||||
console.log("We click on a clipboardCPButton or clipboardCPValueToPrint class");
|
||||
if (window.getSelection) {
|
||||
selection = window.getSelection();
|
||||
|
||||
|
||||
@@ -10236,7 +10236,8 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1)
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a button to copy $valuetocopy in the clipboard
|
||||
* Create a button to copy $valuetocopy in the clipboard.
|
||||
* Code that handle the click is inside lib_foot.jsp.php
|
||||
*
|
||||
* @param string $valuetocopy The value to print
|
||||
* @param int $showonlyonhover Show the copy-paste button only on hover
|
||||
@@ -10245,6 +10246,12 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1)
|
||||
*/
|
||||
function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $texttoshow = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
/*if (!empty($conf->dol_no_mouse_hover)) {
|
||||
$showonlyonhover = 0;
|
||||
}*/
|
||||
|
||||
if ($texttoshow) {
|
||||
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><span class="clipboardCPValue hidewithsize">'.$valuetocopy.'</span><span class="clipboardCPValueToPrint">'.$texttoshow.'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText opacitymedium"></span></span>';
|
||||
} else {
|
||||
|
||||
@@ -51,7 +51,12 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
|
||||
}*/
|
||||
div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete,
|
||||
div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete,
|
||||
div.tabsAction > div.divButAction > span.butAction {
|
||||
div.tabsAction > div.divButAction > span.butAction,
|
||||
div.tabsAction > div.divButAction > span.butActionDelete,
|
||||
div.tabsAction > div.divButAction > span.butActionRefused,
|
||||
div.tabsAction > div.divButAction > a.butAction,
|
||||
div.tabsAction > div.divButAction > a.butActionDelete,
|
||||
div.tabsAction > div.divButAction > a.butActionRefused {
|
||||
margin-bottom: 1.4em !important;
|
||||
margin-right: 0px !important;
|
||||
}
|
||||
|
||||
@@ -6770,10 +6770,14 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before
|
||||
/* For copy-paste feature */
|
||||
/* ============================================================================== */
|
||||
|
||||
span.clipboardCPValueToPrint {
|
||||
display: inline-block;
|
||||
}
|
||||
span.clipboardCPValue.hidewithsize {
|
||||
width: 0 !important;
|
||||
display: inline-block;
|
||||
color: transparent;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.clipboardCPShowOnHover .clipboardCPButton {
|
||||
|
||||
@@ -6634,10 +6634,14 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before
|
||||
/* For copy-paste feature */
|
||||
/* ============================================================================== */
|
||||
|
||||
span.clipboardCPValueToPrint {
|
||||
display: inline-block;
|
||||
}
|
||||
span.clipboardCPValue.hidewithsize {
|
||||
width: 0 !important;
|
||||
display: inline-block;
|
||||
color: transparent;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.clipboardCPShowOnHover .clipboardCPButton {
|
||||
|
||||
Reference in New Issue
Block a user