Welcome, Guest
Username: Password: Remember me

TOPIC:

J3+Styling - Backend - Event view 7 years 3 months ago #20491

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
JEM: 2.1.5
Joomla: 3.4.6 Template: Isis

be aware: changes will be overwritten in case of an update, but maybe it's usefull to someone.

some of the things that can be done better
- page icon
- sliders at the right side
- Select for venue/contact
(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.

J3+Styling - Backend - Event view 7 years 3 months ago #20493

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
sliders at the right side

The thing here is that the code for displaying the sliders is
JHtml::_('sliders.start'.......
JHtml::_('sliders.panel'........
JHtml::_('sliders.end');

an that's the way it was done in Joomla 2.x, it's ofcourse fine to do so as the code works. But the thing here is that the needed classes have been removed from Joomla 3.x and doing so there isn't much styling left. So you can consider to do 2 things: add the classes or just incorporate the new way. Would prefer to use the bootstrap code.

The Joomla 3 way is to incorporate bootstrap Accordion
JHtml::_('bootstrap.startAccordion',.......
JHtml::_('bootstrap.addSlide', .......
JHtml::_('bootstrap.endSlide');......
JHtml::_('bootstrap.endAccordion');

When the bootstrap way is added to the page ..../administrator/components/com_jem/views/event/view.html.php it will be looking like the image.

One downside of using the bootstrap way can be that it doesn't remember the active slide if i'm right. Have to test it to be sure. If it's not remembered then maybe it can be usefull to create a custom js-file for it. Hmm, will test it out
(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.

J3+Styling - Backend - Event view 7 years 3 months ago #20495

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
Page Icon

As notice the icon is not there so add it back. when you read the topic about the events-view you have noticed that a bit of code was changed/added to display the Joomla 2.x icons and won't repeat that.

..../media/com_jem/css/backend.css
add
.icon-eventedit	{ 
	background-image: url(../images/icon-48-eventedit.png); 
}


..../administrator/components/com_jem/views/event/view.html.php
Find: function "protected function addToolbar"

change
JToolBarHelper::title($isNew ? JText::_('COM_JEM_ADD_EVENT') : JText::_('COM_JEM_EDIT_EVENT')), 'eventedit');

to
JToolBarHelper::title('<span class="view_title">'.($isNew ? JText::_('COM_JEM_ADD_EVENT') : JText::_('COM_JEM_EDIT_EVENT')).'</span>', 'eventedit');
(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.

J3+Styling - Backend - Event view 7 years 3 months ago #20496

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
Select fields for venue/contact


To change these fields you have to edit the modal fields.

.../administrator/components/com_jem/models/fields/modal/venue.php

Change
// The current venue input field
$html[] = '<div class="fltlft">';
$html[] = '  <input type="text" id="'.$this->id.'_name" value="'.$venue.'" disabled="disabled" size="35" />';
		$html[] = '</div>';

// The venue select button
$html[] = '<div class="button2-left">';
$html[] = '  <div class="blank">';
$html[] = '    <a class="modal" title="'.JText::_('COM_JEM_SELECT').'" href="'.$link.'&amp;'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x:800, y:450}}">'.
					JText::_('COM_JEM_SELECT').'</a>';
		$html[] = '  </div>';
		$html[] = '</div>';

To
// The current venue input field
$html[] = '<span class="input-append">';
$html[] = '  <input type="text" class="input-medium" id="'.$this->id.'_name" value="'.$venue.'" disabled="disabled" size="35" />';
// The venue select button
$html[] = '    <a class="modal btn hasTooltip" title="'.JText::_('COM_JEM_SELECT').'" href="'.$link.'&amp;'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x:800, y:450}}">';
$html[] = '<span class="icon-file"></span> ';
$html[] = JText::_('COM_JEM_SELECT').'</a>';
$html[] = '</span>';


.../administrator/components/com_jem/models/fields/modal/contact.php

Change
// The current contact input field
		$html[] = '<div class="fltlft">';
		$html[] = '  <input type="text" id="'.$this->id.'_name" value="'.$contact.'" disabled="disabled" size="35" />';
		$html[] = '</div>';

		// The contact select button
		$html[] = '<div class="button2-left">';
		$html[] = '  <div class="blank">';
		$html[] = '    <a class="modal" title="'.JText::_('COM_JEM_SELECT').'" href="'.$link.'&amp;'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x:800, y:450}}">'.
					JText::_('COM_JEM_SELECT').'</a>';
		$html[] = '  </div>';
		$html[] = '</div>';

To
// The current contact input field
		$html[] = '<span class="input-append">';
		$html[] = '  <input type="text" class="input-medium" id="'.$this->id.'_name" value="'.$contact.'" disabled="disabled" size="35" />';

		// The contact select button
		$html[] = '    <a class="modal btn hasTooltip" title="'.JText::_('COM_JEM_SELECT').'" href="'.$link.'&amp;'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x:800, y:450}}">';
		$html[] = '<span class="icon-file"></span> ';
		$html[] = JText::_('COM_JEM_SELECT').'</a>';
		$html[] = '</span>';

If you like you can also change the icon "file" to whatever icon you want.
Icomoon font-set: docs.joomla.org/J3.x:Joomla_Standard_Icomoon_Fonts
(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.

J3+Styling - Backend - Event view 7 years 3 months ago #20497

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493

One downside of using the bootstrap way can be that it doesn't remember the active slide if i'm right. Have to test it to be sure. If it's not remembered then maybe it can be usefull to create a custom js-file for it. Hmm, will test it out


As expected the Accordion slide is not remembered but that can be fixed, did create a js file for JEM3 (a while back) so yep that one can be used. So let's try it.

../administrator/components/com_jem/views/events/view.html.php
EDIT of jojo12: if I am right it's
../administrator/components/com_jem/views/event/view.html.php

Add this line
// Load scripts
JHtml::_('jquery.framework');
JHtml::_('script', 'com_jem/slider-state.js', false, true);

so it will be like
...................................................
// Load scripts
JHtml::_('jquery.framework');
JHtml::_('script', 'com_jem/slider-state.js', false, true);		
JHtml::_('script', 'com_jem/attachments.js', false, true);
.............

Doing so it will search for a file called slider-state.js, that file doesn't exists (yet) so you need to create it.

Go to folder: .../media/com_jem/js/ and add the attached js file to the folder
(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 jojo12.

J3+Styling - Backend - Event view 7 years 3 months ago #20499

  • Bluefox
  • Bluefox's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 4523
  • Thank you received: 493
Reset Hits

.../administrator/components/com_jem/models/fields/hits.php

change
protected function getInput()
	{
		$onclick	= ' onclick="document.id(\''.$this->id.'\').value=\'0\';"';

		return '<input style="border:0;" type="text" name="'.$this->name.'" id="'.$this->id.'" value="'.htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8').'" readonly="readonly" /><input type="button"'.$onclick.' value="'.JText::_('COM_JEM_RESET_HITS').'" class="button"/>';
	}

to
	/**
	 * Method to get the field input markup.
	 *
	 * @return	string	The field input markup.
	 */
	protected function getInput()
	{
		$onclick	= ' onclick="document.id(\''.$this->id.'\').value=\'0\';"';

		$html = array();
		$html[] = '<span class="input-append">';
		$html[] = '<input style="border:0;" type="text" name="'.$this->name.'" id="'.$this->id.'" value="'.htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8').'" readonly="readonly" />';
		$html[] = '<a class="btn"'.$onclick.'>';
		$html[] = '<span class="icon-refresh"></span> ';
		$html[] = JText::_('COM_JEM_RESET_HITS').'</a>';
		$html[] = '</span>';
	
		return implode("\n", $html);
	}

The btn will have black borders but you can correct that with a bit of css
(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.

Time to create page: 0.582 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......