Jump to content


Photo

LinkAction with Symb.ly icons

LinkAction icon Symb.ly

  • Please log in to reply
6 replies to this topic

#1 k1000o

k1000o

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationMadrid

Posted 03 June 2012 - 08:42 PM

Hello

I am trying to find a way to define linkaction's using only a Symb.ly icon.
Is it possible?
In the attached file a sketch of the desired final result.

Attached Thumbnails

  • icons.png


#2 Amit

Amit

    Member

  • Administrators
  • 10 posts

Posted 04 June 2012 - 02:11 PM

Hi,

You could leave the A tag empty and the CSS would take care of the rest, you'll need to give them class names according to the ones which appear in newui.css around line 5057 (.icon-N).

Have a look at my answer here http://zurmo.org/for...g-class-values/ which gives a more in depth explanation.

#3 k1000o

k1000o

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationMadrid

Posted 04 June 2012 - 02:37 PM

I do not understand , sorry....

This case is not the same as in the related post (Which I tested and works)

When we create an action the code is something like this

	class CreateLinkActionElement extends LinkActionElement
	{
		public function getActionType()
		{
			return 'Create';
		}
		protected function getDefaultLabel()
		{
			return Yii::t('Default', 'Create');
		}
		protected function getDefaultRoute()
		{
			$params = array();
			if (Yii::app()->request->getParam('redirectUrl') != null)
			{
				$params = array_merge($params, array('redirectUrl' => Yii::app()->request->getParam('redirectUrl')));
			}
			elseif ($this->getRedirectUrl() != null)
			{
				$params = array_merge($params, array('redirectUrl' => $this->getRedirectUrl()));
			}
			return Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/create/', $params);
		}
	}

Where exactly have i got to include the class name?

<a class="icon-delete" href="/index.php/home/default/DeleteDashboard?dashboardId=3" id="yt0">Delete Dashboard</a>

Thanks

#4 k1000o

k1000o

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationMadrid

Posted 05 June 2012 - 12:12 PM

Hello

I tried to change the class attribute in the view , but as soon as the class is different from 'simple-select' the green cross appears at the left of the text but not the expected icon.


							array('type'				  => 'ColorDeleteAllFromRelatedListLink'
								'htmlOptions' => array
									'class'		=> 'icon-edit')
							),

but if we inspect the HTML code it seems o.k

<a id="SelectColorsForColorChartFromRelatedListLinks" class="icon-edit" href="#">seleccionar</a>

Any ideas?

Attached Thumbnails

  • seleccionar.png


#5 Amit

Amit

    Member

  • Administrators
  • 10 posts

Posted 05 June 2012 - 05:12 PM

We're working on a solution, it will included in one of the coming releases, currently it looks like the 0.7 release. You'll be then able to use only icon-edit and it will show correctly.

#6 Amit

Amit

    Member

  • Administrators
  • 10 posts

Posted 02 July 2012 - 06:29 PM

in the 0.7 release you'll be able to use icon-delete, icon-create, and icon-edit as classes that will render the correct icon in this location.

#7 k1000o

k1000o

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationMadrid

Posted 08 July 2012 - 02:47 PM

Nice!! I'm just waiting to test it.
thanks





Also tagged with one or more of these keywords: LinkAction, icon, Symb.ly

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users