Is there any way to use action on result line of content views?

Hello! Is there any way to use action on result line of content views as for example delete action in relations tab ?

Thanks!

Any answer is welcomed !

2 votes

3 answers

850 views

ANSWER



Hello,

I did that by adding a column with a Template field .. My template was here to add a button who did the action i wanted.

0 votes



Do you give the current id of the document in the row like using the #{row.getData().id} to the JS automation definition ?

0 votes



No,I will tray now.

Thanks.

10/23/2013

I did a JS function who get the document ID on parameter, the function do the jQuery().automation call with the document ID on the options.
10/23/2013

Hi Jvinai! I tried but unsuccessful, I haven't clear idea where and haw to define jQyery.automation which get as parameter #{row.getData().id}. If you can, please send me a sample example of your functions implementation. I will appreciate!
10/23/2013

It's what i did :

    var options = {
        automationParams : {
          params : {},
          context : ctx,
          input : "doc:" +  id
          }
    };
    var op = jQuery().automation("Context.RunDocumentOperation", options);
    op.execute(function(data, textStatus,xhr) 
      {
      //TODO add message
      }, function(data, textStatus,xhr) 
      {
        // TODO add error
      });
  }

The ID is given by parameter.

10/24/2013

Hi Jvinai! I haven't clear idea, how to pass row id as parameter on js Automation. Can you show me your action_template.xhtml source code you have defined, please ?
02/08/2014


Please can you show me one example of template that you have used ? I tray it but in operation didn't get as input corresponding document on row.

Thanks for your answer!

0 votes