Skip to content

Commit

Permalink
Add hook option in case user wants link to display another link
Browse files Browse the repository at this point in the history
  • Loading branch information
asig2016 committed Oct 30, 2017
1 parent 324f0b6 commit f6b3149
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/js/etemplate/et2_widget_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,12 @@ var et2_link = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe
},
"needed": {
"ignore": true
},
"link_hook": {
"name": "Type",
"type": "string",
"default": "view",
"description": "Hook used for displaying link (view/edit/add)"
}
},
legacyOptions: ["only_app"],
Expand Down Expand Up @@ -1282,7 +1288,7 @@ var et2_link = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe
{
this.link.addClass("et2_link");
this.link.click( function(e){
self.egw().open(_value, "", "view",null,_value.app,_value.app);
self.egw().open(_value, "", self.options.link_hook,null,_value.app,_value.app);
e.stopImmediatePropagation();
});
}
Expand Down

0 comments on commit f6b3149

Please sign in to comment.