1
0
Fork 0
Browse Source

2.1.0 Update

- Added support for Espo 7.3.0 checkboxes
master 2.1.0
Andrew Fontana 2 years ago committed by GitHub
parent
commit
637afa9e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      files/client/modules/dynamic-checklist/src/views/fields/dynamic-checklist.js
  2. 4
      manifest.json
  3. 21
      scripts/AfterInstall.php
  4. 21
      scripts/AfterUninstall.php

10
files/client/modules/dynamic-checklist/src/views/fields/dynamic-checklist.js

@ -2,7 +2,7 @@
* This file is part of EspoCRM. * This file is part of EspoCRM.
* *
* EspoCRM - Open Source CRM application. * EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko * Copyright (C) 2014-2023 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: https://www.espocrm.com * Website: https://www.espocrm.com
* *
* EspoCRM is free software: you can redistribute it and/or modify * EspoCRM is free software: you can redistribute it and/or modify
@ -102,13 +102,13 @@ define('dynamic-checklist:views/fields/dynamic-checklist', ['views/fields/array'
} }
var dataValue = this.escapeValue(JSON.stringify(jsonItem)); var dataValue = this.escapeValue(JSON.stringify(jsonItem));
var itemHtml = '<div class="list-group-item" data-value="'+dataValue+'" data-label="'+label+'" style="cursor: default;">'; var itemHtml = '<div class="list-group-item" data-value="'+dataValue+'" data-label="'+label+'" style="cursor: default;">';
itemHtml += '<div style="float:left; margin-right:5px; vertical-align:top;"><input type="checkbox" style="vertical-align:top;" data-name="'+dataName+'" id="'+id+'"'; itemHtml += '<div style="float:left; margin-right:5px; vertical-align:top; margin: -0px 0 -0px;"><input type="checkbox" class="form-checkbox" style="vertical-align:top;" data-name="'+dataName+'" id="'+id+'"';
if(isChecked) { if(isChecked) {
itemHtml += ' checked '; itemHtml += ' checked ';
} }
itemHtml += '></div> '; itemHtml += '></div> ';
//itemHtml += '<input class = "main-element form-control" type="text" class="checklist-label" value="'+label+'">'; //itemHtml += '<input class = "main-element form-control" type="text" class="checklist-label" value="'+label+'">';
itemHtml += '<div style="display:inline-block;max-width:85%;"><label for="'+id+'" class="checklist-label" style="overflow-y: auto !important;">'+label+'</label></div>'; itemHtml += '<div style="display:inline-block;max-width:85%;"><label for="'+id+'" class="checklist-label" style="overflow-y: center !important;">'+label+'</label></div>';
itemHtml += '<div style="float:right; width:10%;"><a href="javascript:" class="pull-right" data-value="'+label+'" data-action="removeValue"><span class="fas fa-trash-alt"></span></a>'; itemHtml += '<div style="float:right; width:10%;"><a href="javascript:" class="pull-right" data-value="'+label+'" data-action="removeValue"><span class="fas fa-trash-alt"></span></a>';
itemHtml += '<a href="javascript:" class="pull-right" data-value="'+label+'" data-action="editValue" style="margin-right:10px;"><span class="fas fa-pencil-alt fa-sm"></span></a>'; itemHtml += '<a href="javascript:" class="pull-right" data-value="'+label+'" data-action="editValue" style="margin-right:10px;"><span class="fas fa-pencil-alt fa-sm"></span></a>';
itemHtml += '</div></div>'; itemHtml += '</div></div>';
@ -219,7 +219,7 @@ define('dynamic-checklist:views/fields/dynamic-checklist', ['views/fields/array'
} }
displayHtml += '<div style="padding-top:2px;padding-bottom:3px;">'; displayHtml += '<div style="padding-top:2px;padding-bottom:3px;">';
displayHtml += '<div style="display:inline-block; margin-right:5px; vertical-align:top;">'; displayHtml += '<div style="display:inline-block; margin-right:5px; vertical-align:top;">';
displayHtml += '<input type="checkbox" data-name="'+dataName+'" id="'+id+'"'; displayHtml += '<input type="checkbox" class="form-checkbox" data-name="'+dataName+'" id="'+id+'"';
if(isChecked) { if(isChecked) {
displayHtml += ' checked '; displayHtml += ' checked ';
} }
@ -399,4 +399,4 @@ define('dynamic-checklist:views/fields/dynamic-checklist', ['views/fields/array'
} }
}); });
}); });

4
manifest.json

@ -1,8 +1,8 @@
{ {
"name": "Dynamic Checklist Field Type", "name": "Dynamic Checklist Field Type",
"version": "2.0.1", "version": "2.1.0",
"acceptableVersions": [ "acceptableVersions": [
">=6.0.6" ">=7.3.0"
], ],
"releaseDate": "2020-12-01", "releaseDate": "2020-12-01",
"author": "Omar A Gonsenheim", "author": "Omar A Gonsenheim",

21
scripts/AfterInstall.php

@ -0,0 +1,21 @@
<?php
class AfterInstall
{
protected $container;
public function run($container)
{
$this->container = $container;
$this->clearCache();
}
protected function clearCache()
{
try {
$this->container->get('dataManager')->clearCache();
} catch (\Exception $e) {
}
}
}

21
scripts/AfterUninstall.php

@ -0,0 +1,21 @@
<?php
class AfterUninstall
{
protected $container;
public function run($container)
{
$this->container = $container;
$this->clearCache();
}
protected function clearCache()
{
try {
$this->container->get('dataManager')->clearCache();
} catch (\Exception $e) {
}
}
}
Loading…
Cancel
Save