Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Added improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
areksolek committed Sep 8, 2023
1 parent d250028 commit ecf14ad
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
3 changes: 1 addition & 2 deletions modules/Vtiger/uitypes/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public function getDisplayValue($value, $record = false, $recordModel = false, $
if ('Base' !== \App\Mail::getMailComposer()) {
$icon = '<span class="fa-solid fa-envelope" aria-hidden="true"></span> ';
$moduleName = $recordModel->getModuleName();
$url = "index.php?module={$moduleName}&action=Fields&mode=getCopyValue&fieldName={$this->getFieldModel()->getName()}&record={$recordModel->getId()}";
$button = "<button type=\"button\" class=\"btn btn-primary btn-xs ml-1 js-copy-clipboard-url\" data-url=\"$url\" title=\"" . \App\Language::translate('BTN_COPY_TO_CLIPBOARD', $moduleName) . '"><span class="fa-regular fa-copy"></span></button>';
$button = "<button type=\"button\" class=\"btn btn-primary btn-xs ml-1 clipboard\" data-copy-attribute=\"clipboard-text\" data-clipboard-text=\"{$value}\" title=\"" . \App\Language::translate('BTN_COPY_TO_CLIPBOARD', $moduleName) . '"><span class="fa-regular fa-copy"></span></button>';
}
return "<a class=\"u-cursor-pointer js-email-compose \" {$data} data-js=\"click|container\">{$icon}{$value}</a>$button";
}
Expand Down
3 changes: 1 addition & 2 deletions modules/Vtiger/uitypes/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ public function getDisplayValue($value, $record = false, $recordModel = false, $
return '<a href="' . $href . '" class="js-popover-tooltip" title="' . $label . ' ' . trim($title) . '">' . $international . '</a>' . $extra;
}
$moduleName = $recordModel->getModuleName();
$url = "index.php?module={$moduleName}&action=Fields&mode=getCopyValue&fieldName={$fieldName}&record={$recordModel->getId()}";
$button = "<button type=\"button\" class=\"btn btn-primary btn-xs ml-1 js-copy-clipboard-url\" data-url=\"$url\" title=\"" . \App\Language::translate('BTN_COPY_TO_CLIPBOARD', $moduleName) . '"><span class="fa-regular fa-copy"></span></button>';
$button = "<button type=\"button\" class=\"btn btn-primary btn-xs ml-1 clipboard\" data-copy-attribute=\"clipboard-text\" data-clipboard-text=\"{$international}\" title=\"" . \App\Language::translate('BTN_COPY_TO_CLIPBOARD', $moduleName) . '"><span class="fa-regular fa-copy"></span></button>';
$data = 'data-phone="' . preg_replace('/(?<!^)\+|[^\d+]+/', '', $international) . '"';
if ($record) {
$data .= ' data-record="' . $record . '"';
Expand Down
3 changes: 2 additions & 1 deletion public_html/layouts/basic/modules/Vtiger/resources/Detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ jQuery.Class(
fieldElement.inputmask();
}
detailViewValue.addClass('d-none');
actionElement.addClass('d-none');
// actionElement.addClass('d-none');
editElement
.removeClass('d-none')
.children()
Expand Down Expand Up @@ -2836,6 +2836,7 @@ jQuery.Class(
// Not detail view page
return;
}
App.Fields.Text.registerCopyClipboard(detailViewContainer);
this.registerWidgetProductAndServices();
this.registerSetReadRecord(detailViewContainer);
this.getForm().validationEngine(app.validationEngineOptionsForRecord);
Expand Down
1 change: 1 addition & 0 deletions public_html/layouts/basic/modules/Vtiger/resources/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -2112,6 +2112,7 @@ $.Class(
if (typeof CustomView !== 'undefined') {
CustomView.registerCustomViewAdvCondEvents(this.getListViewContainer());
}
App.Fields.Text.registerCopyClipboard(this.getListViewContainer());
this.registerMassActionsBtnEvents();
Vtiger_Helper_Js.showHorizontalTopScrollBar();
this.registerUrlFieldClickEvent();
Expand Down
14 changes: 12 additions & 2 deletions public_html/layouts/basic/styles/_Style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,16 @@ td.listViewEntryValue .row input {
padding: 0;
margin-bottom: 0;
}

@media only screen and (min-width: 1200px) {
.listViewEntries .listViewEntryValue .clipboard,
.detailViewTable .fieldValue .clipboard {
display: none;
}
.listViewEntries .listViewEntryValue:hover .clipboard,
.detailViewTable .fieldValue:hover .clipboard {
display: inline-block;
}
}
.listViewContentDiv {
position: relative;
}
Expand Down Expand Up @@ -3401,7 +3410,8 @@ select {
min-width: 400px;
}

.table tr.inventoryRow td,.table tr.inventoryRowGroup td {
.table tr.inventoryRow td,
.table tr.inventoryRowGroup td {
padding: 4px;
}

Expand Down

0 comments on commit ecf14ad

Please sign in to comment.