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.198 seconds

I'm playing around with the new mvc and the FORK feature is FANTASTIC!!! it's saving me a lot of time! you are doing a very good job!!

Tomaselli (Forum)  

Get Started