Minor - format code, improve column size.

pull/2487/head
jmontoyaa 9 years ago
parent 40b8ce6d64
commit a0bfc2a5cc
  1. 23
      main/inc/lib/extra_field.lib.php

@ -90,7 +90,6 @@ class ExtraField extends Model
parent::__construct(); parent::__construct();
$this->type = $type; $this->type = $type;
$this->table = Database::get_main_table(TABLE_EXTRA_FIELD); $this->table = Database::get_main_table(TABLE_EXTRA_FIELD);
$this->table_field_options = Database::get_main_table(TABLE_EXTRA_FIELD_OPTIONS); $this->table_field_options = Database::get_main_table(TABLE_EXTRA_FIELD_OPTIONS);
$this->table_field_values = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES); $this->table_field_values = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
@ -315,7 +314,10 @@ class ExtraField extends Model
$result = Database::query($sql); $result = Database::query($sql);
if (Database::num_rows($result)) { if (Database::num_rows($result)) {
$row = Database::fetch_array($result, 'ASSOC'); $row = Database::fetch_array($result, 'ASSOC');
$row['display_text'] = self::translateDisplayName($row['variable'], $row['display_text']); $row['display_text'] = self::translateDisplayName(
$row['variable'],
$row['display_text']
);
// All the tags of the field // All the tags of the field
$sql = "SELECT * FROM $this->table_field_tag $sql = "SELECT * FROM $this->table_field_tag
@ -1967,41 +1969,41 @@ EOF;
array( array(
'name' => 'display_text', 'name' => 'display_text',
'index' => 'display_text', 'index' => 'display_text',
'width' => '180', 'width' => '140',
'align' => 'left', 'align' => 'left',
), ),
array( array(
'name' => 'variable', 'name' => 'variable',
'index' => 'variable', 'index' => 'variable',
'width' => '', 'width' => '90',
'align' => 'left', 'align' => 'left',
'sortable' => 'true', 'sortable' => 'true',
), ),
array( array(
'name' => 'field_type', 'name' => 'field_type',
'index' => 'field_type', 'index' => 'field_type',
'width' => '', 'width' => '70',
'align' => 'left', 'align' => 'left',
'sortable' => 'true', 'sortable' => 'true',
), ),
array( array(
'name' => 'changeable', 'name' => 'changeable',
'index' => 'changeable', 'index' => 'changeable',
'width' => '50', 'width' => '35',
'align' => 'left', 'align' => 'left',
'sortable' => 'true', 'sortable' => 'true',
), ),
array( array(
'name' => 'visible_to_self', 'name' => 'visible_to_self',
'index' => 'visible_to_self', 'index' => 'visible_to_self',
'width' => '40', 'width' => '45',
'align' => 'left', 'align' => 'left',
'sortable' => 'true', 'sortable' => 'true',
), ),
array( array(
'name' => 'visible_to_others', 'name' => 'visible_to_others',
'index' => 'visible_to_others', 'index' => 'visible_to_others',
'width' => '40', 'width' => '35',
'align' => 'left', 'align' => 'left',
'sortable' => 'true', 'sortable' => 'true',
), ),
@ -2015,14 +2017,14 @@ EOF;
array( array(
'name' => 'field_order', 'name' => 'field_order',
'index' => 'field_order', 'index' => 'field_order',
'width' => '40', 'width' => '25',
'align' => 'left', 'align' => 'left',
'sortable' => 'true', 'sortable' => 'true',
), ),
array( array(
'name' => 'actions', 'name' => 'actions',
'index' => 'actions', 'index' => 'actions',
'width' => '100', 'width' => '40',
'align' => 'left', 'align' => 'left',
'formatter' => 'action_formatter', 'formatter' => 'action_formatter',
'sortable' => 'false', 'sortable' => 'false',
@ -2209,7 +2211,6 @@ JAVASCRIPT;
JAVASCRIPT; JAVASCRIPT;
return "function action_formatter(cellvalue, options, rowObject) { return "function action_formatter(cellvalue, options, rowObject) {
console.log(options);
return '$editButton $deleteButton'; return '$editButton $deleteButton';
}"; }";
} }

Loading…
Cancel
Save