Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Action selected info on input file 16 Sep 2013 15:15 #11104

When the user selects an action to do on a file ('remove', 'thumbs', 'delete', 'trash'). there is no INFO about what he just selected.

this is what I do:


in order to do that we have to modify the file root\administrator\components\com_component\dom\html\form\input\file\default.php around the line 160, add this:
$jsRemove .= "jQuery('#". $this->getInputId('action-selected') ."').html('". JText::_("JDOM_ACTION_SELECTED") .": ". $item['text'] ."');";

around the line 179 modify the following lines:
		//Close the control		
		$html .= '</div>' .LN;
		$html .= '</div>' .LN;
		
		//MaxSize
		$html .= $this->buildMaxSize();

to:
		//Close the control		
		$html .= '</div>' .LN;

		
		//MaxSize
		$html .= $this->buildMaxSize();
		$html .= '</div>' .LN; /* hack */


around line 188 change the following lines:
		$html .= $this->buildFileExtensions();
		
		return $html;

and add:
		$html .= $this->buildFileExtensions();
		$html .= '<span class="action-info" id="'.  $this->getInputId('action-selected') .'"></span>'; /* hack */
		
		return $html;


add a bit of CSS to the css files:
.action-info {
	font-size: 80%;
	font-style: italic;
	color:green;
	font-weight: bold;
}

add language string: JDOM_ACTION_SELECTED="Action selected"
to the language files.

and we are done. :)
The following user(s) said Thank You: admin

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

Action selected info on input file 19 Sep 2013 12:12 #11121

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
The icon is changing when you change action, so you can know what have been selected.
In the coming upgrade, this has been improved an fixed.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.055 seconds

Les générateurs de code je les connais presque tous pour les avoir essorés en long en large et en travers ... mais celui ci c'est vraiment un outil formidable de simplicité et d'efficacité !
Marc. (liubov - Forum)

Get Started