How to customise ag-grid pagination - pagination

Is it possible to customize ag-grid pagination for angular.
Attached custom pagination image for reference.
<ag-grid-angular id="myGrid" style="width: 500px; height: 500px;" class="ag-theme-alpine"
[rowData]="gridOptions.rowData"
[columnDefs]="gridOptions.columnDefs" [pagination]="true" [paginationPageSize]="paginationPageSize"
(gridReady)="onGridReady($event)" (cellClicked)="onCellClicked($event)"
[defaultColDef]="defaultColDef"
[frameworkComponents]="frameworkComponents" [allowContextMenuWithControlKey]="true"
[getContextMenuItems]="getContextMenuItems" >
</ag-grid-angular>
onPageSizeChanged(event: any) {
var value = event.target.value;
this.gridApi.paginationSetPageSize(Number(value));
}

To create a customised pagination panel, you have to do the following two things:
Set suppressPaginationPanel=true to tell the grid to not show the default controls for pagination, as shown in the documentation
Create a Custom Status Bar Panel to design your pagination panel as per your requirements. Note that this is an enterprise feature, so if you have a AG Grid license, you could contact the team via Zendesk for further support on this.

Related

Custom Search Result Box For Blog

My Blogger custom search gadget in a menu when click on this its visible but I want it to the visible always. my blog www.bloggerspices.bid
Use this
div#searchbox {
display: block !important;
}

Hide edit tab in editform.aspx page for a list?

Based on client requirement, we have customized list editform.aspx page. By default when user lands on that page, edit tab is expanded. We do not want anyone to see the ribbon on page load. We do not want to hide s4-ribbonrow. Currently I am using This article to hide the edit tab on page load. But this takes lot of time (5 seconds).
Is there any other way that we can achieve this and still be fast? Please let me know your thought on this.
Environment: SharePoint Online
Thanks for all your help!
Try to use this css:
#Ribbon\.ListForm\.Edit {
display: none;
}
#Ribbon\.ListForm\.Edit-title {
display: none;
}

How to hide View in Browser in document library in sharepoint 2010 using javascript or jquery

I had integrated Office Web Apps in sharepoint 2010. When Document is selected from document Library in context menu I want to hide Option View in Browser and Edit in Browser Option from Document Library.
Is is possible using jquery or javascript If yes can any tell me how ?
I used following css to hide but it only hide Delet option not View in Browser Option
li.ms-MenuUIULItem[text~=Delete]
{
display: none;
}
So I also Modified it as follows
li.ms-MenuUIULItem[text~=View in Browser]
{
display: none;
}
It also didn't work.
Can anyone help me for that ?
It is better to do it with features than doing it with javascript.
You have to create a feature with a HideCustomAction element in it.
The element structure is like this:
<HideCustomAction
GroupId = "[GroupId]"
HideActionId = "[HideActionId]"
Id = "...."
Location = "....">
</HideCustomAction>
And here is a link that will help you find your required actions Id:
http://www.sharepointarchitects.us/johnholliday/post/0001/01/01/how-to-find-customaction-identifiers/
I have created it using jquery
$(document).ready(function(){
$('.ms-MenuUIPopupBody').live('blur', function() {
var elm = $("div.ms-MenuUIULItem a:contains('View in Browser')");
elm.remove();
$("div.ms-MenuUIULItem a:contains('Edit in Browser')").remove();
});
});
It is hiding menu only on focus or blur or mouseover
I wants it to be hide on load AS soon as i Click on "V" option on right side of document it should hide View in Browser and Edit in browser
When I click on V option ![I wants As soon as i Click on v option right side of test it should hide view in Browser and edit in browser][1]

Liferay: How to fetch the first 3 items from an asset publisher?

In Liferay I have used the asset publisher to publish news on my news page. I want to fetch the 3 top news from the page and embed it into another page. How can I do this? The page URL containing the news links looks like the following:
Liferay.Widget({ url: 'http://test.com/testnews/101_INSTANCE_f22'});
Liferay itself has a property where one can share an asset publsiher instance any where else on a site, but that is not exactly what I want. So any help or guidance is appreciated. Thanks.
If you want only links then you can set display style 'title-list' (this will take you to the article on the main news page).
if you want to open the link in another page, change asset link behavior to 'View in a specific portlet'.
You can change the look of asset publisher to whatever design you want. follow the path look & feel --> advanced styling --> Copy the portlet id. Now by using mozilla firefox pick the class,tags,etc. and write your css code. This will override the basic design. E.g.
#p_p_id_101_INSTANCE_8f5JPIxv8ml0_ .asset-abstract {
width: 25%;
float: left;
}
Is there a particular reason why you don't want to configure another AssetPublisher on the second page? You can just use the identical configuration, but limit the number of results shown to 3 - done.
Problem solved. Here is the solution with jQuery:
$.get('http://test.com/news/', function(data) {
var top3links = $(data).find('a:lt(3)');
$('#top3').html(top3links); // });

Layout based on Page - OrchardCMS

I have encountered an issue when using Orchard that I am sure there should be a fairly simple fix / solution for, but I have yet to find it.
I am trying to establish a specific width content area for my home page (580px), and a larger width for content pages (800px).
Layout.cshtml Snippet:
<div id='content'>
#Zone(Model.Content)
</div>
Style:
#Content
{
[...]
width: 580px;
}
Currently - the Content div wraps all of my content regardless of the page (either Home Page or Content). I am wondering if it is possible to use a different div to wrap the content based on the Page, as shown:
Layout.cshtml Idea:
#if(Model.Page != "Home")
{
<div id='fullcontent'>
#Zone(Model.Content)
</div>
}
else
{
<div id='content'>
#Zone(Model.Content)
</div>
}
I'm unsure if the above suggested method is possible (or I am unsure how to check for the current Page) - but any other suggestions would be appreciated.
You can use the Designer Tools module (built-in all recent Orchard versions) and enable the URL alternates feature. You'll then be able to create a layout-url-homepage.cshtml alternate for your layout.
You can use the Layout Selector Module to assign a custom layout to any content item.
http://gallery.orchardproject.net/List/Modules/Orchard.Module.Orchard.DesignerTools
You could use the Vandelay.Classy module to add custom tags to the page that represents your homepage, although it does add a lot of fields to the Page content editor.

Resources