Welcome, Guest
Username: Password: Remember me

TOPIC: [ADDED] Action selected info on input file

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

  • Tomaselli
  • Tomaselli's Avatar
  • Online
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
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 administrator has disabled public write access.
The following user(s) said Thank You: admin

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
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
The administrator has disabled public write access.
Time to create page: 0.151 seconds

Get Started