CHUVASH.euhttps://chuvash.eu
CHunky Universe of Vigourous Astonishing SHarepoint :)
Tue, 25 Sep 2018 18:05:01 +0000 en
hourly
1 http://wordpress.com/https://secure.gravatar.com/blavatar/e48ee09e3417741dfc979d81685a9396?s=96&d=https%3A%2F%2Fs0.wp.com%2Fi%2Fbuttonw-com.pngCHUVASH.euhttps://chuvash.eu
SwiftKey from the Chuvash point of viewhttps://chuvash.eu/2018/09/25/swiftkey-from-the-chuvash-point-of-view/
https://chuvash.eu/2018/09/25/swiftkey-from-the-chuvash-point-of-view/#respondTue, 25 Sep 2018 18:01:43 +0000http://chuvash.eu/?p=4496SwiftKey is a keyboard app for iOS and Android, it adds a new virtual keyboard and it provides the Chuvash one among others.

Here is my review of Swiftkey from the perspective of a person who writes in Chuvash on the mobile.

Positive things

The fact that it has the Chuvash keyboard map is awesome. There is no official Chuvash keyboard in iOS, Android, MacOS, Windows (well you can add Chuvash, but you won’t get the Chuvash letters). Only Linux has the built-in Chuvash keyboard.

It has a built-in Chuvash dictionary, so that can provide suggestions. It also can learn from your typing. Although there is an issue with the suggestions, see below.

The Chuvash characters with diacritics are right: Unicode and Cyrillic, not their look-alikes from the Latin set. It is important: if people use the same characters, they can find more on Google.

Negative things

Actually I don’t want to call it negative things, many of them are just missing features. I hope with that review I can get in contact with the Swiftkey team and improve the app.

Chuvash letters with diacritics are “hidden” behind their “siblings” without diacritics. To get ӗ you have to long-press е then е and ӗ will pop up. The Chuvash letters should be in the front. Some typical Russian letters can be moved to the back, e.g. ц, щ, ж, д, г etc. Those “Russian” letters are used in Russian loanwords. See the proposal of the keymap below.

There are “too many” characters, the keyboard buttons are too small on the mobile. This issue is the same for the Russian keyboard. Since Chuvash has fewer Core Chuvash letters, we could take the rare ones to the back, it would be okay to long-press to get them: г, д, ж, з, щ etc.

One character is used a lot, it is a simple hyphen “-“. It is between words and small additions to express questions, wondering, nice asking: -и?, ши?, -ҫкӗ, -ха etc. Also in the “collection words”: сӗтел-пукан (furnitures), сас-хура (rumors). It is heavily used and having the hyphen somewhere in the front, would make typing a lot faster in Chuvash.

Swiftkey should be at least tri-lingual, not bi-lingual. It is limited to 2 languages only on the iOS (on Android you can add up to five languages). Consider a typical Chuvash guy who needs to write in Russian in his daily life. He also writes in Chuvash in social networks. Occasionally, he has to input latin letters (domain names, e-mail etc), meaning he needs the third language – English.

The dictionary used for the suggestions seems to use a mix of Cyrillic diacritics and their latin look-alikes: ӑӗҫ. They are not treated as the same letters, therefore many right words are excluded from the suggestions. A solution for that would be a simple find and replace of three letters (the capitals and versals): Latin A with breve to Cyrillic A with breve, Latin E with breve to Cyrillic E with breve. Latin C with cedilla to the Cyrillic C with Cedilla. But even Latin Y with diaresis should be replaced with Cyrillic y with double acute.

Keymap proposal

Since many “Russian” letters are not used a lot, they could be brought back and accessed by long-pressing the keys. I would suggest, keep the existing keymaps (Russian Compact, Russian Phonetic, Russian Full), but also add a new keymap: “Chuvash Compact”. Here are the three rows of characters.

Top row (10 chars) : й ӳ у к е н ӗ ш ӑ х

Middle row (10 chars): ҫ ы в а п р о л – э

Bottom row (8 chars): я ч с м и т ь ю

The “long-pressed” characters:

к: к г (why: simplified: they represent allophones in Chuvash)

е: е ё (ё to type some Russian loanwords)

ш: ш ж (why: simplified: they represent allophones in Chuvash)

х: х ф (historically ф was transformed to х or хв, still not very common letter)

ҫ: ҫ щ (why: simplified: they represent allophones in Chuvash)

п: п б (why: simplified: they represent allophones in Chuvash)

-: – ! (why: hyphen is used a lot in the words, the exclamation mark is used often after onomatopoetic words)

It has been a while I last worked with PowerShell. I had my custom profile where I had my own prompt and some other customizations. Now I cannot find it anymore. I’ll start with the new one and I am saving it on my blog, so it will be easier to find in future:

VS Code
Now we can run VS Code to create ps1 scripts and run selections as we did it in PowerShell ISE.

]]>https://chuvash.eu/2016/06/13/my-powershell-profile/feed/2mirontoliScreen Shot 2016-06-13 at 20.52.26Update Field.JSLink using JSOM or RESThttps://chuvash.eu/2016/05/30/update-field-jslink-using-jsom-or-rest/
https://chuvash.eu/2016/05/30/update-field-jslink-using-jsom-or-rest/#respondMon, 30 May 2016 17:49:21 +0000http://chuvash.eu/?p=4370Today I have just a little code snippet to share. This code snippet shows how to update the JSLink property for an existing field using JSOM and REST. For REST I use sharepoint-utilities.

with __metadata: { type: SP.Field } and JSLink property in the payload

and ‘X-RequestDigest‘ header (but it is nicely handled by sharepoint-utilities)

]]>https://chuvash.eu/2016/05/30/update-field-jslink-using-jsom-or-rest/feed/0mirontoliTrigger SP2010 Workflows using JSOMhttps://chuvash.eu/2016/05/19/trigger-sp2010-workflows-using-jsom/
https://chuvash.eu/2016/05/19/trigger-sp2010-workflows-using-jsom/#commentsThu, 19 May 2016 15:55:53 +0000http://chuvash.eu/?p=4326Today I found out how to start workflows in JSOM (JavaScript Object Model in SharePoint). Nothing special, but since it is not documented, it took me a while to find a solution. Here is the code which I want to keep as simple as possible.

What you need to start a SP2010 Workflow for a list item or a document in JSOM, you need to load SP.WorkflowServices.js and you need to create the manager and get the service, then you can trigger a workflow using the workflow name, the list guid and the guid of the list item:

The code above is inspired from this gist and sharepoint stackexchange. It is a simplified version that only works for list item workflows and SharePoint 2010 workflows.
Here is an example how you can get multiple items and batch start a workflow:

Why I needed it

I created a simple workflow that is triggered on Item Added and Item Updated. Unfortunately there are already thousands of items in the document library. To trigger them manually is nothing good. But a simple javascript solution did exactly what I wanted.

]]>https://chuvash.eu/2016/05/19/trigger-sp2010-workflows-using-jsom/feed/2mirontoliCreate and download a file in javascripthttps://chuvash.eu/2016/05/15/create-and-download-a-file-in-javascript/
https://chuvash.eu/2016/05/15/create-and-download-a-file-in-javascript/#respondSun, 15 May 2016 16:03:08 +0000http://chuvash.eu/?p=4280Phew, I spent a lot of time to get this to work:

Safari

So it works on the latest Chrome (tested with 50 on Windows, Mac and Linux), Firefox (tested with 46 on Windows), Internet Explorer (tested with 11 on Windows 7). Unfortunately in Safari on a Mac, the link is opened directly in the web browser. You have to press Cmd – S to trigger Save As manually.

Part of SharePoint Utilities

]]>https://chuvash.eu/2016/05/15/create-and-download-a-file-in-javascript/feed/0mirontoliMinimal Download Strategy. Simplehttps://chuvash.eu/2016/04/27/minimal-download-strategy-simple/
https://chuvash.eu/2016/04/27/minimal-download-strategy-simple/#commentsWed, 27 Apr 2016 05:22:21 +0000http://chuvash.eu/?p=4217There are many correct ways (1, 2, 3, 4, 5…) of making scripts work with the Minimal Download Strategy Feature (MDS) in SharePoint 2013 and 2016. But to be honest – every time I need it, I get confused. So now it is time to find a simple solution for that.

Who is better at it than the developers of the SharePoint themselves? Look at the MDS code in the built-in Display Templates:

Let’s keep it as simple as Item_Default.js, let’s take it as it is and create our own scripts. Here is a skeletton of and MDS-ready script:

Related findings

External scripts (outside SharePoint Site Collection, from CDN) within ScriptBlock of a custom action (like AddJSLink in PnP) work withou any MDS-adjustments. The ScriptBlock adds a script tag to the head of the html document, and it the js reference is added to every AjaxDelta load. I would need more time to find out why. The good news is: it is an argument for using more CDN solutions in SharePoint.

Old stuff

A while ago I wrote two blog posts about MDS. Now I realise they were overcomplicated and the solution required customizations of the master page and 3rd-party scripts.

]]>https://chuvash.eu/2016/04/27/minimal-download-strategy-simple/feed/2mirontolimds-001Minimal Display Templatehttps://chuvash.eu/2016/04/13/minimal-display-template/
https://chuvash.eu/2016/04/13/minimal-display-template/#commentsWed, 13 Apr 2016 05:50:13 +0000http://chuvash.eu/?p=4130We want to use our own Display Templates on Non-publishing sites – our team sites. Without the Publishing Feature activated you have to create an own javascript file. Here is short and concise instructions how to install it: Display Templates on Non-publishing Sites.

As described on that blog, you can make copy of an existing Item_Default.js and adjust to your needs.

I also asked Elio Struyf and I got the same tip. I did create my starter template. Here I want to share this very minimal javascript based Display Template. The real Minimal Display Template is in the SPCSR github repository: Item_Minimal.js It has been improved by Elio Stuyf himself

Prefer JavaScript Display Templates if you are a developer and you want to have a better control

Never update the built-in Display Templates.

Centralize reused parts of Display Templates – utilities, common parts, css. Use a CDN site for that.

Check out the SPCSR github repo, there are many Display Templates that you can use or be inspired from.

Create your own folder in _catalogs/masterpage/Display Template/Search to have all your Display Templates within a site collection.

]]>https://chuvash.eu/2016/04/13/minimal-display-template/feed/1mirontolidisplaytemplate-002displaytemplate-003displaytemplate-001SharePoint Utilities – a promising JavaScript Frameworkhttps://chuvash.eu/2016/04/07/sharepoint-utilities-a-promising-javascript-framework/
https://chuvash.eu/2016/04/07/sharepoint-utilities-a-promising-javascript-framework/#commentsThu, 07 Apr 2016 05:08:36 +0000http://chuvash.eu/?p=4094My colleagues at Bool have developed a new JavaScript framework for SharePoint – sharepoint utilities. It started on our DevDay last year – a whole free day when we could learn new things, try out new techniques or build something that was not even requested from a customer. I was not working on sharepoint utilities, so I almost forgot it until…

I recently re-discovered sharepoint utilities. It is on Github, it is MIT licensed and contributions are welcome. The core of sharepoint utilities (sputils) is a set of wrappers for Search, TermStore, REST that allow you be more productive as a developer.

What I find especially compelling with that it contains some other fundamental stuff that every SharePoint developer needs:

XHR, you only need to use sputils.rest.get or sputils.rest.post to make Ajax requests to SharePoint, no need for jQuery or sprequestexecutor.js

Promise, it contains a minimalist Promise framework – no need for jQuery.Deferred. All calls to SharePoint _api are wrapped in promises. So there is a better way of making calls to SharePoint.

DateTime, it contains some useful functions for working with dates and time.

Functional JavaScript. No need for underscore.js or lodash.js.

To me, XHR and Promises are two important parts that I need in every solution. So instead of linking jQuery and preparing reusable XHR functions for SharePoint, I’d recommend using sharepoint-utilities.

Everybody loves User Custom Actions in SharePoint. That’s the only recommended way of customizing SharePoint. You have heard about it. Unfortunately there is no convinient way of administering them. People have their console applications or powershell scripts to add, update and delete user custom actions. It works but it is hard to open up Visual Studio or PowerShell every time you will try out an idea on a test site.

To overcome this, I have created a tiny little tool, packaged as a bookmarklet for your browser. When you click on it, it will show your existing user custom actions and you can add new user custom actions.

It is an ongoing little project, available on github, contributions are welcome. What’s left is:

Implement Delete operation

Implement Update operation

Improve the UI.

Here is how it looks today:

To use this tool, add a new bookmark in your browser and copy the content of bookmarklet.html as the url.

Resources on that topic:

What it can be used for

It can be used on test sites to try out ideas. But do not use it in Production. On ther other hand, parts of this script can be used in other scenarios, like adding new functionality by site owners directly from the browser, where data is predefined.

How to add a JavaScript code

You can use this boilerplate code to add a UserCustomAction, just put it into the textarea and click “Add new”: