Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear button in article publish date #17809

Merged
merged 7 commits into from
Mar 17, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion administrator/components/com_modules/models/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,8 @@ public function save($data)

if ($data['title'] == $orig_table->title)
{
$data['title'] .= ' ' . JText::_('JGLOBAL_COPY');
//$data['title'] .= ' ' . JText::_('JGLOBAL_COPY');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete line.

From Joomla Coding Standards:
Do not leave commented code unless there is a clearly explained reason for doing so. In such a case, a comment saying "Code intentionally commented" will prevent accidental removal.

$data['title'] = StringHelper::increment($data['title']);
}
}

Expand Down
8 changes: 3 additions & 5 deletions media/system/js/fields/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,11 +784,10 @@
row = createElement("div", this.wrapper);
row.className = "buttons-wrapper btn-group";

this._nav_save = hh(JoomlaCalLocale.save, '', 100, 'button', '', 'js-btn btn btn-clear', {"type": "button", "data-action": "clear"});
this._nav_clear = hh(JoomlaCalLocale.clear, '', 100, 'button', '', 'js-btn btn btn-clear', {"type": "button", "data-action": "clear"});

if (!this.inputField.hasAttribute('required')) {
var savea = row.querySelector('[data-action="clear"]');
savea.addEventListener("click", function (e) {
var cleara = row.querySelector('[data-action="clear"]');
cleara.addEventListener("click", function (e) {
e.preventDefault();
var days = self.table.querySelectorAll('td');
for (var i = 0; i < days.length; i++) {
Expand All @@ -801,7 +800,6 @@
self.inputField.setAttribute('value', '');
self.inputField.value = '';
});
}

if (this.params.showsTodayBtn) {
this._nav_now = hh(JoomlaCalLocale.today, '', 0, 'button', '', 'js-btn btn btn-today', {"type": "button", "data-action": "today"});
Expand Down
Loading