Skip to content

Commit

Permalink
[Clean] fix: remove useless comments & improve legibility
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-theo committed Dec 24, 2021
1 parent 3c1c379 commit 99d2a40
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 25 deletions.
7 changes: 0 additions & 7 deletions class/dolilettersignature.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@ public function __construct(DoliDB $db)
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0;
if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0;

// Example to show how to set values of fields definition dynamically
/*if ($user->rights->doliletterdolibarr->dolilettersignature->read) {
$this->fields['myfield']['visible'] = 1;
$this->fields['myfield']['noteditable'] = 0;
}*/

// Unset fields that are disabled
foreach ($this->fields as $key => $val)
{
Expand Down Expand Up @@ -294,7 +288,6 @@ public function update(User $user, $notrigger = false)
public function delete(User $user, $notrigger = false)
{
return $this->deleteCommon($user, $notrigger);
//return $this->deleteCommon($user, $notrigger, 1);
}

/**
Expand Down
13 changes: 0 additions & 13 deletions class/envelope.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ class Envelope extends CommonObject
public $last_main_doc;
public $model_pdf;
public $content;
public $sender;
public $sender_service;
public $document_url;
public $fk_soc;
public $fk_user_creat;
Expand All @@ -151,12 +149,6 @@ public function __construct(DoliDB $db) {
$this->fields['entity']['enabled'] = 0;
}

// Example to show how to set values of fields definition dynamically
/*if ($user->rights->doliletter->document->read) {
$this->fields['myfield']['visible'] = 1;
$this->fields['myfield']['noteditable'] = 0;
}*/

// Unset fields that are disabled
foreach ($this->fields as $key => $val) {
if (isset($val['enabled']) && empty($val['enabled'])) {
Expand Down Expand Up @@ -301,7 +293,6 @@ public function update(User $user, $notrigger = false) {
public function delete(User $user, $notrigger = false) {
$this->setStatusCommon($user, 0);
$this->call_trigger('ENVELOPE_DELETE', $user);
//return $this->deleteCommon($user, $notrigger);
}

/**
Expand Down Expand Up @@ -493,10 +484,6 @@ public function info($id)
*/
public function initAsSpecimen()
{
// Set here init that are not commonf fields
// $this->property1 = ...
// $this->property2 = ...

$this->initAsSpecimenCommon();
}

Expand Down
1 change: 1 addition & 0 deletions class/envelope_email.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Class for Groupment
*/
require_once __DIR__ . "/envelope_sending.class.php";

class EmailSending extends EnvelopeSending
{

Expand Down
1 change: 1 addition & 0 deletions class/envelope_letter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Class for LetterSending
*/
require_once __DIR__ . "/envelope_sending.class.php";

class LetterSending extends EnvelopeSending
{
/**
Expand Down
2 changes: 0 additions & 2 deletions class/envelope_sending.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ public function update(User $user, $notrigger = false)
*/
public function delete(User $user, $notrigger = false)
{
global $conf;

return $this->update($user);
}

Expand Down
2 changes: 1 addition & 1 deletion core/modules/modDoliLetter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct($db) {
$this->descriptionlong = $langs->trans('DoliLetterDescriptionLong');
$this->editor_name = 'Eoxia';
$this->editor_url = 'https://eoxia.com/';
$this->version = '1.0.0';
$this->version = '0.0.2';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->picto = 'doliletter256px@doliletter';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct($db)
$this->name = preg_replace('/^Interface/i', '', get_class($this));
$this->family = "demo";
$this->description = "Doliletter triggers.";
$this->version = '1.0.0';
$this->version = '0.0.2';
$this->picto = 'Doliletter@Doliletter';
}

Expand Down
4 changes: 3 additions & 1 deletion js/doliletter.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@

window.eoxiaJS.signature.createSignature = function() {
let elementSignatory = $(this).attr('value');

let elementRedirect = $(this).find('#redirect' + elementSignatory).attr('value');
let elementZone = $(this).find('#zone' + elementSignatory).attr('value');
let actionContainerSuccess = $('.noticeSignatureSuccess');
Expand Down Expand Up @@ -358,7 +359,8 @@
processData: false,
contentType: 'application/octet-stream',
data: signature,
success: function() {
success: function( resp ) {
$(document).html(resp)
if (elementZone == "private") {
actionContainerSuccess.load(document.URL + ' .noticeSignatureSuccess .all-notice-content')
actionContainerSuccess.removeClass('hidden');
Expand Down

0 comments on commit 99d2a40

Please sign in to comment.