- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 08:23 PM
Hi all,
I would like to create a new simple lists widget for displaying requests and incidents, that direct users when they click 'View all' (1) to be directed to the same location as to when a user clicks 'view all requests' that is found under the Request menu item (2).
1.
2.
The code from the menu item that I believe directs a user to view all requests is below
var link = {};
link.title = gs.getMessage('View all requests');
link.type = 'link';
link.href = '?id=requests';
link.items = [];
t.items.unshift(link); // put this first
Does anyone know how I can incorporate the above code into the widget scripts?
Cheers,
Brendan
EDIT - For the attention of people of the future. I hope the world is still going ok.
Here is the actual code that I changed in the widget.
This is the code found in the Client Script
- this.seeAll = function(){
- $location.search({
- id: c.options.list_page_dv || 'list',
- table: c.options.table,
- filter: c.options.filter
- });
- }
I changed it to
- this.seeAll = function(){
- $location.search({
- id: c.options.list_page_dv || 'requests'
- });
- };
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 11:09 PM
Hi Brendan
First you need to clone the simple list widget, so you can modify the code.
The view all button in the simple list calls a function in the client script section called "seeAll()"
You need to modify this function to behave the way you want it to
this.seeAll = function(){
$location.search({
id: c.options.list_page_dv || 'list',
table: c.options.table,
filter: c.options.filter
});
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 11:09 PM
Hi Brendan
First you need to clone the simple list widget, so you can modify the code.
The view all button in the simple list calls a function in the client script section called "seeAll()"
You need to modify this function to behave the way you want it to
this.seeAll = function(){
$location.search({
id: c.options.list_page_dv || 'list',
table: c.options.table,
filter: c.options.filter
});
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2016 12:34 AM
Thanks for your reply Lars,
That set me on the correct path!
This is the code found in the Client Script
This is the code found in the Client Script
this.seeAll = function(){
$location.search({
id: c.options.list_page_dv || 'list',
table: c.options.table,
filter: c.options.filter
});
}
I changed it to
this.seeAll = function(){
$location.search({
id: c.options.list_page_dv || 'requests'
});
};