We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Collapse / Expand icons

Thread ID:

Created:

Updated:

Platform:

Replies:

143562 Mar 26,2019 08:45 PM UTC Apr 1,2019 02:05 PM UTC JavaScript 6
loading
Tags: ejKanban
Martin Pamplin
Asked On March 26, 2019 08:45 PM UTC

I have been asked if we can change the icons used to expand & collapse the columns & swim lanes in a kanban board. I can see that these are derived from the ej.widgets charater set.

I am hoping that someone may have done this before and can give me an example.

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 28, 2019 06:01 AM UTC

Hi Martin, 
 
We have achieved your requirement through CSS and default EJ icons, kindly refer the below links. 
 
.e-kanban .e-slcollapse:before, 
  .e-kanban .e-clcollapse:before { 
      content: "\e606"; 
    } 
    .e-kanban .e-slexpand:before, 
    .e-kanban .e-clexpand:before { 
      content: "\e607" 
    } 
 
Regards, 
Karthi 


Martin Pamplin
Replied On March 28, 2019 09:23 AM UTC

Thanks, I have that working. The question is can I add my own icons in here somehow?

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 29, 2019 06:10 AM UTC

Hi Martin, 
 
Yes, custom icon can be added in the same way. In the below sample, Bootstrap Glyphicon is added. 

 
<link rel="stylesheet" rel='nofollow' href="//maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">  
 
<style>  
  .e-kanban .e-slcollapse:before, 
  .e-kanban .e-clcollapse:before { 
     content: "\e030"; 
    } 
    .e-kanban .e-slexpand:before, 
    .e-kanban .e-clexpand:before { 
      content: "\e031" 
    } 
  </style> 
 
create: function (args){ 
                   var lenCl = $(".e-icon.e-clexpand").length; 
                                  for(var i=0; i<lenCl; i++) { 
                                                               icon = $(".e-icon.e-clexpand")[0]; 
                                                               icon.classList.replace("e-icon", "glyphicon"); 
                                               } 
                                               var lenSwim = $(".e-icon.e-slexpand").length; 
                                               for(var j=0; j<lenSwim; j++) { 
                                                               icon = $(".e-icon.e-slexpand")[0]; 
                                                               icon.classList.replace("e-icon", "glyphicon"); 
                                               } 
                  } 
 

Regards, 
Karthi 


Martin Pamplin
Replied On March 29, 2019 09:30 AM UTC

Yes, but I am asking if we can create an entirely new, never seen before, icon?

Hareesh Balasubramanian [Syncfusion]
Replied On April 1, 2019 02:02 PM UTC

Hi Martin, 
 
Yes, you can create your own font icons, for which many online tools are available to make use of. The generated icons can then be located and referenced in your application which uses ej controls, by defining its source path to the font-face as shown in the following code example. Once the font family is defined in your application, you can now replace any of the existing icon content with the newly generated content code. 
  
@font-face { 
    font-family: 'customiconpackname'; 
    src: url('../fonts/customiconpack.eot?lchn8y'); 
    src: url('../fonts/customiconpack.eot?lchn8y#iefix') format('embedded-opentype'), 
         url('../fonts/customiconpack.ttf?lchn8y') format('truetype'), 
         url('../fonts/customiconpack.woff2?lchn8y') format('woff'), 
         url('../fonts/customiconpack.woff?lchn8y') format('woff'), 
         url('../fonts/customiconpack.svg?lchn8y#customiconpack') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
} 
 
selector:after { 
    font-family: 'customiconpackname'; 
    content: '\e953'; 
    } 
 
Please refer the following stack over flow link which will demonstrate how to generate custom icons and use it in application 
  
Regards, 
Hareesh B

Hareesh Balasubramanian [Syncfusion]
Replied On April 1, 2019 02:05 PM UTC

Hi Martin, 
 
Yes, you can create your own font icons, for which many online tools are available to make use of. The generated icons can then be located and referenced in your application which uses ej controls, by defining its source path to the font-face as shown in the following code example. Once the font family is defined in your application, you can now replace any of the existing icon content with the newly generated content code. 
  
@font-face { 
    font-family: 'customiconpackname'; 
    src: url('../fonts/customiconpack.eot?lchn8y'); 
    src: url('../fonts/customiconpack.eot?lchn8y#iefix') format('embedded-opentype'), 
         url('../fonts/customiconpack.ttf?lchn8y') format('truetype'), 
         url('../fonts/customiconpack.woff2?lchn8y') format('woff'), 
         url('../fonts/customiconpack.woff?lchn8y') format('woff'), 
         url('../fonts/customiconpack.svg?lchn8y#customiconpack') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
} 
 
selector:after { 
    font-family: 'customiconpackname'; 
    content: '\e953'; 
    } 
 
Please refer the following stack over flow link which will demonstrate how to generate custom icons and use it in application 
  
Regards, 
Hareesh B

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;