This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.get('https://cdnjs.cloudflare.com/ajax/libs/jquery.devbridge-autocomplete/1.2.21/jquery.autocomplete.min.js', function() { | |
$('.b-article-add-form__title__input input').autocomplete({ | |
serviceUrl: 'https://api.tjournal.ru/2/club?category=news&sortMode=all&count=50', | |
minChars: 2, | |
//forceFixPosition: true, | |
noCache: true, | |
transformResult: function(res, orig) { | |
var data = JSON.parse(res); | |
var suggestions = []; | |
var origArr = orig.split(' '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ### Content Helper | |
// | |
// *Usage example:* | |
// `{{content}}` | |
// `{{content words="20"}}` | |
// `{{content characters="256"}}` | |
// `{{content preview="true"}}` | |
// `{{content preview="true" words="20"}}` | |
// | |
// Turns content html into a safestring so that the user doesn't have to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module Portal { | |
export interface IListItem { | |
ID: number; | |
Title: string; | |
Author: SP.FieldUserValue; | |
Created: Date; | |
} | |
export interface IBook extends IListItem { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Microsoft.SharePoint; | |
namespace ConsoleApplication1 | |
{ | |
internal class Program | |
{ | |
private static void Main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="btn-toolbar" data-role="editor-toolbar" data-target="#editor"> | |
<div class="btn-group"> | |
<a class="btn btn-default" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i class="fa fa-bold"></i></a> | |
<a class="btn btn-default" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i class="fa fa-italic"></i></a> | |
<a class="btn btn-default" data-edit="strikethrough" title="Strikethrough"><i class="fa fa-strikethrough"></i></a> | |
<a class="btn btn-default" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i class="fa fa-underline"></i></a> | |
</div> | |
<div class="btn-group"> | |
<a class="btn btn-default" data-edit="insertunorderedlist" title="Bullet list"><i class="fa fa-list-ul"></i></a> | |
<a class="btn btn-default" data-edit="insertorderedlist" title="Number list"><i class="fa fa-list-ol"></i></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function() { | |
$('div[id^=PostBody]').atwho({ | |
at: "@", | |
search_key: "DisplayText", | |
limit: 10, | |
callbacks: { | |
remote_filter: function(query, callback) { | |
var context = SP.ClientContext.get_current(); | |
var picker = new SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters(); | |
picker.set_allowMultipleEntities(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> | |
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BlogsWebPart.ascx.cs" Inherits="Portal.Blogs.WebParts.BlogsWebPart.BlogsWebPart" %> | |
<SharePoint:CssRegistration ID="CssRegistration1" Name="/_layouts/15/Portal/Blogs/BlogsWebPart.css" runat="server" After="corev15.css" /> | |
<SharePoint:ScriptLink ID="ScriptLink1" runat="server" Name="~SiteCollection/_layouts/15/Portal/Blogs/BlogsWebPart.js" Localizable="False"></SharePoint:ScriptLink> | |
<div id="blogsWebPart" ><img alt="Loading..." src="/_layouts/15/images/loading.gif"/></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private UserProfile _profile; | |
public string PublicUrl | |
{ | |
get | |
{ | |
return _profile.PublicUrl != null ? _profile.PublicUrl.AbsoluteUri : string.Empty; | |
} | |
} |