Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

dimkk/spBsControls

Repository files navigation

spBsControls 0.2.0

This library changes standard SharePoint(365 and On Prem) list form behaviour using CSR. Features are:

  1. Twitter Bootstrap - works in context of form, transforming it to emulate regular bootstrap form.
  2. Open Source instead of standard ones:
  1. Works in IE9+ and all modern browsers
  2. You can pass parameters of the 3rd party controls with respect to its manuals

####Using:

<link href='/Style%20Library/build/vendor.css' media='screen' rel='stylesheet' type='text/css'/>
<script src='/Style%20Library/build/vendor.js' type='text/javascript'></script>
<link href='/Style%20Library/build/spBsCtrls.css' media='screen' rel='stylesheet' type='text/css' />
<script src='/Style%20Library/build/spBsCtrls.js' type='text/javascript'></script>
  • You can use Cisar (https://github.com/andrei-markeev/cisar), for example, to create proper js file for jslink property of list form webpart, or you can pick it from source: https://github.com/dimkk/spBsControls/blob/master/test.js
  • If you are not using Cisar, open properties of list form web part and add path to test.js file from source in JSLink property, for example - ~siteCollection/Style Library/test.js
  • Now look through test.js - its commented and simple - just create form wrapper, field wrapper and decide which field to enhance (use internal name of field, and don't forget to set right form context)

##How to pass params of third party controls?: Lets say, we need to customise dropdown in select2 control for lookup field - we need to show underscored ID and bold text:

##Contribute

  1. Install node
  2. git clone https://github.com/dimkk/spBsControls.git
  3. cmd - to project
  4. npm install
  5. bower install
  6. gulp (will build project, dont forget to set variables https://github.com/dimkk/spBsControls/blob/master/gulp.config.js - path to mounted folder in SharePoint)
  7. gulp watch - will check the sources. Will rebuild and transfer result to mounted SharePoint folder
  8. gulp trans - will send test.js to folder, which was set in config https://github.com/dimkk/spBsControls/blob/master/gulp.config.js

##Ru:

Библиотека изменяет стандартную форму листа SharePoint(2013 и 365) используя CSR, добавляя следующее:

  1. Twitter Bootstrap - работает только в контексте этой формы. Добавляет необходимые элементы в разметку и форма становится похожа на обычнуй форму бутстрап
  2. Open Source контролы вместо стандартных:
  1. Работает в IE9
  2. Можно передавать параметры соответствующих опен сурс решений (Параметры смотреть в документации к соотв. решению)

####Использование:

  • Кладем файлы из https://github.com/dimkk/spBsControls/tree/master/build куда-то в SharePoint (для примера в библиотеку стилей)
  • Заходим на листформу
  • Добавляем Script Editor Webpart
  • Указываем путь до файлов (Например у меня в библиотеке стилей):
<link href='/Style%20Library/build/vendor.css' media='screen' rel='stylesheet' type='text/css'/>
<script src='/Style%20Library/build/vendor.js' type='text/javascript'></script>
<link href='/Style%20Library/build/spBsCtrls.css' media='screen' rel='stylesheet' type='text/css' />
<script src='/Style%20Library/build/spBsCtrls.js' type='text/javascript'></script>
  • Используя, например, Cisar (https://github.com/andrei-markeev/cisar) - создаем js для csr, или берем для примера из репо: https://github.com/dimkk/spBsControls/blob/master/test.js
  • Если не используем Cisar - заходим в свойства веб-части отображения формы листа и указываем путь до JS файла, например - ~siteCollection/Style Library/test.js

Протестировано на IE9+, Chrome 41

Проект заморожен

##Как передавать параметры: Например, если нужно кастомизировать то, как отображается lookup поле - (выводить подчёркнутое id итема и жирным - значение):

##Для разработки

  1. Ставим node
  2. git clone https://github.com/dimkk/spBsControls.git
  3. cmd - заходим в проект
  4. npm install
  5. bower install
  6. gulp (соберет проект, не забудьте указать в https://github.com/dimkk/spBsControls/blob/master/gulp.config.js - путь до папки в SP)
  7. gulp watch - будет следить за изменениями
  8. gulp trans - закинет test.js в папку указанную в настройках https://github.com/dimkk/spBsControls/blob/master/gulp.config.js

####Тут немного видео: Видос

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /