Ordenar Array de objetos por property de texto (Título, etc) en Typescript

Si tenemos un array de objetos con multiples propiedades, podemos ordenarlo en base a una de sus propiedades de tipo texto, como puede ser, en muchos casos, el título. Utilizaremos la funcion "sort" comparando los títulos con "localeCompare", de la siguiente manera: let orderedArray = myOriginalArray.sort((a, b) => a.Title.localeCompare(b.Title));

Añadir Tipos de Fuente en la Ribbon de SharePoint

Se pueden añadir estilos personalizados en el editor de texto de la ribbon de sharepoint mediante el uso exclusivo de CSS: Crear un nuevo elemento p.ms-rteElement-MyElement1 { -ms-name: 'My Custom Element'; /* CSS Styles Here */ } El primer selector de css es el elemento que vamos a usar (en este caso, un párrafo "p", …

Sigue leyendo Añadir Tipos de Fuente en la Ribbon de SharePoint

Export SQL query to CSV

1. Execute your Query with "Results to Grid" option selected (You can select this option with its icon or by menu "Query - Results To - Results to grid"). 2. Once your Query has finished, right-click on the results grid and select the option "Save results As...". 3. Save as Type: CSV.

Disable input ENTER key in Chrome, FireFox, IE (including IE8), etc. by Javascript & JQuery

In order to disable the ENTER key in your textbox type input, you have to add the 'onkeydown' attribute and call a javascript function that checks the key and avoid to submit the form when you press ENTER key. Input example <input name="myName" type="text" value="Search" onclick="eraseInitialText(this);" onkeydown="disableEnter();"> Javascript function function disableEnter() { var key = …

Sigue leyendo Disable input ENTER key in Chrome, FireFox, IE (including IE8), etc. by Javascript & JQuery