Welcome, Guest
Username: Password: Remember me

TOPIC:

J3+Styling - Backend - Attendees view 6 years 7 months ago #20488

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4525
  • Thank you received: 492
whoops, seems the code for export needs to be addressed a bit more as it will give problems.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

Please Log in or Create an account to join the conversation.

J3+Styling - Backend - Attendees view 6 years 7 months ago #20489

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4525
  • Thank you received: 492
More code for Export to Toolbar

File .../administrator/components/com_jem/views/attendees/tmpl/default.php

Add this in the top of the file
JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		document.adminForm.task.value=task;
		if (task == "attendees.export") {
			Joomla.submitform(task, document.getElementById("adminForm"));
			document.adminForm.task.value="";
		} else {
      		Joomla.submitform(task, document.getElementById("adminForm"));
		}
	};
');


so it will look like
defined('_JEXEC') or die;
JHtml::_('behavior.tooltip');

$colspan = ($this->event->waitinglist ? 10 : 9);

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		document.adminForm.task.value=task;
		if (task == "attendees.export") {
			Joomla.submitform(task, document.getElementById("adminForm"));
			document.adminForm.task.value="";
		} else {
      		Joomla.submitform(task, document.getElementById("adminForm"));
		}
	};
');
?>

<form action="<?php echo JRoute::_('index.php?option=com_jem&view=attendees'); ?>"  method="post" name="adminForm" id="adminForm">
	<table class="adminlist">

The thing here was that the task value wasn't blanked when we are pressing the export button and doing so it had problems.
For example: when the above code wasn't inserted. Press export and go to next page of results. It will trigger the export again.

The code above will blank the task value when the export button is pressed and doing so it should be working ok.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

Please Log in or Create an account to join the conversation.

J3+Styling - Backend - Attendees view 6 years 7 months ago #20490

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4525
  • Thank you received: 492
Print layout

when printing you probably did notice the text "print" in the right corner.
It would be nice to have a icon there so let's change things.

File: ..../administrator/components/com_jem/views/attendees/tmpl/print.php

Change
<table style="width:100%" class="adminlist">
		<tr>
			<td class="sectionname" width="100%"><font style="color: #C24733; font-size : 18px; font-weight: bold;"><?php echo JText::_('COM_JEM_REGISTERED_USER'); ?></font></td>
			<td><div class="button2-left"><div class="blank"><a href="#" onclick="window.print();return false;"><?php echo JText::_('COM_JEM_PRINT'); ?></a></div></div></td>
		</tr>
	</table>


To
<div class="clearfix">
	<div class="pull-left">
		<font style="color: #C24733; font-size : 18px; font-weight: bold;"><?php echo JText::_('COM_JEM_REGISTERED_USER'); ?></font>
	</div>
	<div class="pull-right">
		<button type="button" class="btn" onclick="window.print();return false;"><span class="icon-print"></span>&nbsp;<?php echo JText::_('COM_JEM_PRINT'); ?></button>
	</div>
</div>

Be aware that when printing it will show the print icon and to hide that you need to tweak the css a bit.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Bluefox.
Time to create page: 0.438 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......