'translatable' => $this->_translatable, 'migrateTranslatable' => $this->_migrateTranslatable,
'preview' => $this->_preview,
'column_type' => $this->_columnType, 'column_move_after' => $this->_columnMoveAfter, 'column_format' => $this->_columnFormat, 'column_width' => 300, 'column_escape' => true,
- 'default' => $this->_default, 'cast' => $this->_cast, 'column_view_namespace' => $this->_columnViewNamespace, 'searchLogic' => $this->_searchLogic,
+ 'default' => $this->_default, 'non_default_tracking' => true,
+ 'cast' => $this->_cast, 'column_view_namespace' => $this->_columnViewNamespace, 'searchLogic' => $this->_searchLogic,
'allow_null' => true,
'can' => $this->_can, 'can_write' => $this->_canWrite, 'auth' => $this->_auth,
'database_type' => $this->_databaseType, 'database_unique' => $this->_databaseUnique, 'database_index' => $this->_databaseIndex, 'database_default' => $this->_databaseDefault, 'database_length' => $this->_databaseLength,
Arr::set($res, $e[1], $v);
}
}
+
return $res;
}
if ($this->hasAttribute('when')) {
$wrapperAttributes['data-when'] = json_encode($this->getAttribute('when'));
}
+
+ if (!$this->getAttribute('non_default_tracking')) {
+ $wrapperAttributes['data-non-default-tracking'] = 0;
+ }
$this->setAttribute('wrapperAttributes', $wrapperAttributes);
}
jQuery('document').ready(function ($) {
$(document).on('change', 'select,input,textarea', function () {
- $(this).closest('[data-default]').addClass('live-change')
+ $(this).closest('[data-default]:not([data-non-default-tracking="0"])').addClass('live-change')
markChangedFields();
});
});
function markChangedFields() {
- $('[data-default]').each(function () {
+ $('[data-default]:not([data-non-default-tracking="0"])').each(function () {
var v = '';
$(this).find('[name="' + $(this).data('name') + '"]').each(function () {
if ($(this).is(':checkbox') && !$(this).prop('checked')) {