From ad7fcdbd5de81a73348ab8bfc68873c3fcec24e4 Mon Sep 17 00:00:00 2001
From: Eric Bailey Alerts allow you to communicate information to the user on the fly. Begin by creating an alert anchor with the By default, new alerts are placed below any alerts already present in the alert anchor but if you set Also by default, alerts will be dismissable by the user with a small × in the upper-right corner of the alert. You can override this behavior by setting Alerts allow you to communicate information to the user on the fly. Begin by creating an alert anchor with the By default, new alerts are placed below any alerts already present in the alert anchor but if you set Also by default, alerts will be dismissable by the user with a small × in the upper-right corner of the alert. You can override this behavior by setting ` tags are not being overridden anymore
+- More correct highlighting of code blocks inside non-`
` containers:
+ highlighter now doesn't insist on replacing them with its own container and
+ just replaces the contents.
+- Small fixes in browser compatibility and heuristics.
+
+[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
+[html 5]: http://en.wikipedia.org/wiki/HTML5
+[ik]: http://kalnitsky.org.ua/
+
+### For developers
+
+The most significant change is the ability to include language submodes right
+under `contains` instead of defining explicit named submodes in the main array:
+
+ contains: [
+ 'string',
+ 'number',
+ {begin: '\\n', end: hljs.IMMEDIATE_RE}
+ ]
+
+This is useful for auxiliary modes needed only in one place to define parsing.
+Note that such modes often don't have `className` and hence won't generate a
+separate `` in the resulting markup. This is similar in effect to
+`noMarkup: true`. All existing languages have been refactored accordingly.
+
+Test file test.html has at last become a real test. Now it not only puts the
+detected language name under the code snippet but also tests if it matches the
+expected one. Test summary is displayed right above all language snippets.
+
+
+## CDN
+
+Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
+[Link up][l]!
+
+[yandex]: http://yandex.com/
+[l]: http://softwaremaniacs.org/soft/highlight/en/download/
+
+
+## Version 5.10 — "Paris".
+
+Though I'm on a vacation in Paris, I decided to release a new version with a
+couple of small fixes:
+
+- Tomas Vitvar discovered that TAB replacement doesn't always work when used
+ with custom markup in code
+- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
+
+
+## Version 5.9
+
+A long-awaited version is finally released.
+
+New languages:
+
+- Andrew Fedorov made a definition for Lua
+- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
+ Nginx config
+- [Vladimir Moskva][vm] made a definition for TeX
+
+[pl]: http://kung-fu-tzu.ru/
+[vm]: http://fulc.ru/
+
+Fixes for existing languages:
+
+- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
+ [YARD][] inline documentation
+- the definition of SQL has become more solid and now it shouldn't be overly
+ greedy when it comes to language detection
+
+[ls]: http://gnuu.org/
+[yard]: http://yardoc.org/
+
+The highlighter has become more usable as a library allowing to do highlighting
+from initialization code of JS frameworks and in ajax methods (see.
+readme.eng.txt).
+
+Also this version drops support for the [WordPress][wp] plugin. Everyone is
+welcome to [pick up its maintenance][p] if needed.
+
+[wp]: http://wordpress.org/
+[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
+
+
+## Version 5.8
+
+- Jan Berkel has contributed a definition for Scala. +1 to hotness!
+- All CSS-styles are rewritten to work only inside `` tags to avoid
+ conflicts with host site styles.
+
+
+## Version 5.7.
+
+Fixed escaping of quotes in VBScript strings.
+
+
+## Version 5.5
+
+This version brings a small change: now .ini-files allow digits, underscores and
+square brackets in key names.
+
+
+## Version 5.4
+
+Fixed small but upsetting bug in the packer which caused incorrect highlighting
+of explicitly specified languages. Thanks to Andrew Fedorov for precise
+diagnostics!
+
+
+## Version 5.3
+
+The version to fulfil old promises.
+
+The most significant change is that highlight.js now preserves custom user
+markup in code along with its own highlighting markup. This means that now it's
+possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
+[initial proposal][1] and for making a proof-of-concept patch.
+
+Also in this version:
+
+- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
+ support for CSS @-rules and Ruby symbols.
+- Yura Zaripov has sent two styles: Brown Paper and School Book.
+- Oleg Volchkov has sent a definition for [Parser 3][p3].
+
+[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
+[p3]: http://www.parser.ru/
+[vp]: http://vasily.polovnyov.ru/
+[vd]: http://dolzhenko.blogspot.com/
+
+
+## Version 5.2
+
+- at last it's possible to replace indentation TABs with something sensible
+ (e.g. 2 or 4 spaces)
+- new keywords and built-ins for 1C by Sergey Baranov
+- a couple of small fixes to Apache highlighting
+
+
+## Version 5.1
+
+This is one of those nice version consisting entirely of new and shiny
+contributions!
+
+- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
+- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
+ original visual style for it is now available for all highlight.js languages
+ under the name "Magula".
+- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
+ languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
+ the matter.
+
+[vooon]: http://vehq.ru/about/
+[rukeba]: http://rukeba.com/
+[drake]: http://drakeguan.org/
+[ke]: http://k-evdokimenko.moikrug.ru/
+
+
+## Version 5.0
+
+The main change in the new major version of highlight.js is a mechanism for
+packing several languages along with the library itself into a single compressed
+file. Now sites using several languages will load considerably faster because
+the library won't dynamically include additional files while loading.
+
+Also this version fixes a long-standing bug with Javascript highlighting that
+couldn't distinguish between regular expressions and division operations.
+
+And as usually there were a couple of minor correctness fixes.
+
+Great thanks to all contributors! Keep using highlight.js.
+
+
+## Version 4.3
+
+This version comes with two contributions from [Jason Diamond][jd]:
+
+- language definition for C# (yes! it was a long-missed thing!)
+- Visual Studio-like highlighting style
+
+Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
+
+[jd]: http://jason.diamond.name/weblog/
+
+
+## Version 4.2
+
+The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
+somewhat experimental meaning that for highlighting "keywords" it doesn't use
+any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
+in parentheses wherever it makes sense. I'd like to ask people programming in
+Lisp to confirm if it's a good idea and send feedback to [the forum][f].
+
+Other changes:
+
+- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
+- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
+ test.html
+- comments now allowed inside Ruby function definition
+- [MEL][] language from [Shuen-Huei Guan][drake]
+- whitespace now allowed between `
"),B+=w.r,w=w.parent;while(w!=a.parent);return o.eE&&(M+=n(t)),y="",a.starts&&b(a.starts,""),o.rE?0:t.length}if(f(t,w))throw new Error('Illegal lexeme "'+t+'" for mode "'+(w.cN||"` and `
`
+- better auto-detection of C++ and PHP
+- HTML allows embedded VBScript (`<% .. %>`)
+
+[f]: http://softwaremaniacs.org/forum/highlightjs/
+[voldmar]: http://voldmar.ya.ru/
+[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
+[drake]: http://drakeguan.org/
+
+
+## Version 4.1
+
+Languages:
+
+- Bash from Vah
+- DOS bat-files from Alexander Makarov (Sam)
+- Diff files from Vasily Polovnyov
+- Ini files from myself though initial idea was from Sam
+
+Styles:
+
+- Zenburn from Vladimir Epifanov, this is an imitation of a
+ [well-known theme for Vim][zenburn].
+- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
+ just one color in only three gradations :-)
+
+In other news. [One small bug][bug] was fixed, built-in keywords were added for
+Python and C++ which improved auto-detection for the latter (it was shame that
+[my wife's blog][alenacpp] had issues with it from time to time). And lastly
+thanks go to Sam for getting rid of my stylistic comments in code that were
+getting in the way of [JSMin][].
+
+[zenburn]: http://en.wikipedia.org/wiki/Zenburn
+[alenacpp]: http://alenacpp.blogspot.com/
+[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
+[jsmin]: http://code.google.com/p/jsmin-php/
+
+
+## Version 4.0
+
+New major version is a result of vast refactoring and of many contributions.
+
+Visible new features:
+
+- Highlighting of embedded languages. Currently is implemented highlighting of
+ Javascript and CSS inside HTML.
+- Bundled 5 ready-made style themes!
+
+Invisible new features:
+
+- Highlight.js no longer pollutes global namespace. Only one object and one
+ function for backward compatibility.
+- Performance is further increased by about 15%.
+
+Changing of a major version number caused by a new format of language definition
+files. If you use some third-party language files they should be updated.
+
+
+## Version 3.5
+
+A very nice version in my opinion fixing a number of small bugs and slightly
+increased speed in a couple of corner cases. Thanks to everybody who reports
+bugs in he [forum][f] and by email!
+
+There is also a new language — XML. A custom XML formerly was detected as HTML
+and didn't highlight custom tags. In this version I tried to make custom XML to
+be detected and highlighted by its own rules. Which by the way include such
+things as CDATA sections and processing instructions (` ... ?>`).
+
+[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
+
+
+## Version 3.3
+
+[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
+File export.html contains a little program that shows and allows to copy and
+paste an HTML code generated by the highlighter for any code snippet. This can
+be useful in situations when one can't use the script itself on a site.
+
+
+[xonix]: http://xonixx.blogspot.com/
+
+
+## Version 3.2 consists completely of contributions:
+
+- Vladimir Gubarkov has described SmallTalk
+- Yuri Ivanov has described 1C
+- Peter Leonov has packaged the highlighter as a Firefox extension
+- Vladimir Ermakov has compiled a mod for phpBB
+
+Many thanks to you all!
+
+
+## Version 3.1
+
+Three new languages are available: Django templates, SQL and Axapta. The latter
+two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
+SQL definition but I'd never started it be it from the ground up :-)
+
+The engine itself has got a long awaited feature of grouping keywords
+("keyword", "built-in function", "literal"). No more hacks!
+
+[1]: http://roudakov.ru/
+
+
+## Version 3.0
+
+It is major mainly because now highlight.js has grown large and has become
+modular. Now when you pass it a list of languages to highlight it will
+dynamically load into a browser only those languages.
+
+Also:
+
+- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
+ RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
+ languages!
+- Heuristics for C++ and HTML got better.
+- I've implemented (at last) a correct handling of backslash escapes in C-like
+ languages.
+
+There is also a small backwards incompatible change in the new version. The
+function initHighlighting that was used to initialize highlighting instead of
+initHighlightingOnLoad a long time ago no longer works. If you by chance still
+use it — replace it with the new one.
+
+[RibKit]: http://ribkit.sourceforge.net/
+
+
+## Version 2.9
+
+Highlight.js is a parser, not just a couple of regular expressions. That said
+I'm glad to announce that in the new version 2.9 has support for:
+
+- in-string substitutions for Ruby -- `#{...}`
+- strings from from numeric symbol codes (like #XX) for Delphi
+
+
+## Version 2.8
+
+A maintenance release with more tuned heuristics. Fully backwards compatible.
+
+
+## Version 2.7
+
+- Nikita Ledyaev presents highlighting for VBScript, yay!
+- A couple of bugs with escaping in strings were fixed thanks to Mickle
+- Ongoing tuning of heuristics
+
+Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
+
+
+## Version 2.4
+
+- Peter Leonov provides another improved highlighting for Perl
+- Javascript gets a new kind of keywords — "literals". These are the words
+ "true", "false" and "null"
+
+Also highlight.js homepage now lists sites that use the library. Feel free to
+add your site by [dropping me a message][mail] until I find the time to build a
+submit form.
+
+[mail]: mailto:Maniac@SoftwareManiacs.Org
+
+
+## Version 2.3
+
+This version fixes IE breakage in previous version. My apologies to all who have
+already downloaded that one!
+
+
+## Version 2.2
+
+- added highlighting for Javascript
+- at last fixed parsing of Delphi's escaped apostrophes in strings
+- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
+ Perl
+
+
+## Version 2.0
+
+- Ruby support by [Anton Kovalyov][ak]
+- speed increased by orders of magnitude due to new way of parsing
+- this same way allows now correct highlighting of keywords in some tricky
+ places (like keyword "End" at the end of Delphi classes)
+
+[ak]: http://anton.kovalyov.net/
+
+
+## Version 1.0
+
+Version 1.0 of javascript syntax highlighter is released!
+
+It's the first version available with English description. Feel free to post
+your comments and question to [highlight.js forum][forum]. And don't be afraid
+if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
+
+[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
diff --git a/inst/demo/www/LICENSE b/inst/demo/www/LICENSE
new file mode 100644
index 0000000..422deb7
--- /dev/null
+++ b/inst/demo/www/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of highlight.js nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/inst/demo/www/README.md b/inst/demo/www/README.md
new file mode 100644
index 0000000..8618022
--- /dev/null
+++ b/inst/demo/www/README.md
@@ -0,0 +1,101 @@
+# Highlight.js
+
+[](https://travis-ci.org/isagalaev/highlight.js)
+
+Highlight.js is a syntax highlighter written in JavaScript. It works in the
+browser as well as on the server. It works with pretty much any markup,
+doesn't depend on any framework and has automatic language detection.
+
+
+## Getting Started
+
+The bare minimum for using highlight.js on a web page is linking to the library
+along with one of the styles and calling [`initHighlightingOnLoad`][1]:
+
+```html
+
+
+
+```
+
+This will find and highlight code inside of `` tags trying to detect
+the language automatically. If automatic detection doesn't work for you, you can
+specify the language in the class attribute:
+
+```html
+
+```
+
+The list of supported language classes is available in the [class reference][8].
+Classes can also be prefixed with either `language-` or `lang-`.
+
+To disable highlighting altogether use the `nohighlight` class:
+
+```html
+...
+```
+
+## Custom Initialization
+
+When you need a bit more control over the initialization of
+highlight.js, you can use the [`highlightBlock`][2] and [`configure`][3]
+functions. This allows you to control *what* to highlight and *when*.
+
+Here's an equivalent way to calling [`initHighlightingOnLoad`][1] using jQuery:
+
+```javascript
+$(document).ready(function() {
+ $('pre code').each(function(i, block) {
+ hljs.highlightBlock(block);
+ });
+});
+```
+
+You can use any tags instead of `...` to mark up your code. If you don't
+use a container that preserve line breaks you will need to configure
+highlight.js to use the `
` tag:
+
+```javascript
+hljs.configure({useBR: true});
+
+$('div.code').each(function(i, block) {
+ hljs.highlightBlock(block);
+});
+```
+
+For other options refer to the documentation for [`configure`][3].
+
+
+## Getting the Library
+
+You can get highlight.js as a hosted or custom-build browser script or as a
+server module. Head over to the [download page][4] for all the options.
+
+Note, that the library is not supposed to work straight from the source on
+GitHub, it requires building. If none of the pre-packaged options work for you
+refer to the [building documentation][5].
+
+
+## License
+
+Highlight.js is released under the BSD License. See [LICENSE][10] file for
+details.
+
+
+## Links
+
+The official site for the library is at `, попытавшись
+автоматически определить язык. Когда автоопределение не срабатывает, можно явно
+указать язык в атрибуте class:
+
+```html
+
+```
+
+Список поддерживаемых классов языков доступен в [справочнике по классам][8].
+Класс также можно предваоить префиксами `language-` или `lang-`.
+
+Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`:
+
+```html
+...
+```
+
+## Инициализация вручную
+
+Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
+использовать функции [`highlightBlock`][2] и [`configure`][3]. Таким образом
+можно управлять тем, *что* подсвечивать и *когда*.
+
+Вот пример инициализация, эквивалентной вызову [`initHighlightingOnLoad`][1], но
+с использованием jQuery:
+
+```javascript
+$(document).ready(function() {
+ $('pre code').each(function(i, block) {
+ hljs.highlightBlock(block);
+ });
+});
+```
+
+Вы можете использовать любые теги разметки вместо `...`. Если
+используете контейнер, не сохраняющий переводы строк, вам нужно сказать
+highlight.js использовать для них тег `
`:
+
+```javascript
+hljs.configure({useBR: true});
+
+$('div.code').each(function(i, block) {
+ hljs.highlightBlock(block);
+});
+```
+
+Другие опции можно найти в документации функции [`configure`][3].
+
+
+## Установка библиотеки
+
+Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
+индивидуальную сборку, а также установив модуль на сервере. На
+[страница загрузки][4] подробно описаны все варианты.
+
+Обратите внимание, что библиотека не предназначена для использования в виде
+исходного кода на GitHub, а требует отдельной сборки. Если вам не подходит ни
+один из готовых вариантов, читайте [документацию по сборке][5].
+
+
+## Лицензия
+
+Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
+[LICENSE][10].
+
+
+## Ссылки
+
+Официальный сайт билиотеки расположен по адресу
")),e}function g(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/(\s|^)hljs(\s|$)/)||a.push("hljs"),r&&a.push(r),a.join(" ").trim()}function p(e){var n=a(e);if(!/no(-?)highlight/.test(n)){var t;E.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/
/g,"\n")):t=e;var r=t.textContent,o=n?s(n,r,!0):l(r),u=i(t);if(u.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(u,i(p),r)}o.value=f(o.value),e.innerHTML=o.value,e.className=g(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)}function b(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function m(){return Object.keys(R)}function N(e){return R[e]||R[x[e]]}var E={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=s,e.highlightAuto=l,e.fixMarkup=f,e.highlightBlock=p,e.configure=d,e.initHighlighting=h,e.initHighlightingOnLoad=v,e.registerLanguage=b,e.listLanguages=m,e.getLanguage=N,e.inherit=o,e.IR="[a-zA-Z][a-zA-Z0-9_]*",e.UIR="[a-zA-Z_][a-zA-Z0-9_]*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},e.CLCM={cN:"comment",b:"//",e:"$",c:[e.PWM]},e.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[e.PWM]},e.HCM={cN:"comment",b:"#",e:"$",c:[e.PWM]},e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("python",function(e){var r={cN:"prompt",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},l={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},c={cN:"params",b:/\(/,e:/\)/,c:["self",r,l,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,l,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n]/,c:[e.UTM,c]},{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("r",function(e){var r="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[e.HCM,{b:r,l:r,k:{keyword:"function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",c:[e.BE],v:[{b:'"',e:'"'},{b:"'",e:"'"}]}]}});
\ No newline at end of file
diff --git a/inst/demo/www/styles/arta.css b/inst/demo/www/styles/arta.css
new file mode 100644
index 0000000..9f61a0e
--- /dev/null
+++ b/inst/demo/www/styles/arta.css
@@ -0,0 +1,140 @@
+/*
+Date: 17.V.2011
+Author: pumbur ~
MoI4
G3S-EN>9CM!{YB*|;6wg-K3V?)eR((z#1
zHyX+Us~H@9)~!8`K-#ZDU>v8HpiaQ|@=VU5MgT@ehzQ(1nZ!M0ZDk{Fb`>pCb0vQE
z`gX@ZK}6S!(-($v3w8-+L6Xs~;@WTrR}q42gH9p2ncZYDab8*`#p8jbS&H9$DTx{1
z|8L)r+}X3oIp6b9dN^fZsl0TpRK4NW^TVGZOit8~r*qM+QL3pd7G0|~C`PHxw2PM3
z->n8iEh)LU)Je%r7nEt|D%&F&(={XI*19z_HKI38aE6Cfm-buU7W|=mo3gMA57~g`
z7aBx4OS&(O5w@W;2pO@ZVyG;2^F+2cYshx%M2*M@%;(4quYc}>z1WX(9ccb&>8#{j
zE=VlFg+&2-xsr%AY_}ciz4+<$^}2TO2e)byPmJl?+aOU7{UVx$=ZNQDTQLxsh}+(_
zak-NBw`v4=+Ydp_L=w^J1&NT$-AbEUuj%8LN7nJzt^APyl$(ght>;(o{)xCqf8IX6
zq`a-CyPq$UOPJN(oo>$gX?v65Yn?Okqp8ZYE~ymacnbL{jExU#!eyp{f&~&7KrUZ(@I$|
z*^;qz>W?cO%fU+}`r^A}yw+(=Jny@=CHlQvYr*sZn~
bsAlert() function in the iu.R script. You can then add alerts to this anchor with createAlert() and remove them with closeAlert().append = FALSE in createAlert() the new alert will overwrite any existing alerts. dismiss = FALSE in createAlert(). The alert can then only be removed using closeAlert() (be sure to set alertId when you create the alert) or by creating a new alert with append = FALSE in the same anchor." + data.title + "
";
- }
-
- al = al + data.message + "" + data.title + "
");
+ }
+ if(data.hasOwnProperty("content")) {
+ $alert.append(data.content);
}
-);
-Shiny.addCustomMessageHandler("closeAlert",
- function(alertId) {
- $("#"+alertId).alert('close');
+ if(data.append == true) {
+ $alert.appendTo("#" + data.id);
+ } else {
+ $("#" + data.id).html($alert);
}
-);
+});
+
+Shiny.addCustomMessageHandler("bsAlertClose", function(alertId) {
+ $("#" + alertId).alert('close');
+});
\ No newline at end of file
diff --git a/man-roxygen/component.R b/man-roxygen/component.R
new file mode 100644
index 0000000..3d6b78c
--- /dev/null
+++ b/man-roxygen/component.R
@@ -0,0 +1,14 @@
+#'<% low <- tolower(item_name) %>
+#'<% cn <- gsub("\\s","", low) %>
+#'@rdname <%=cn %>s
+#'@name <%=item_name %>s
+#'
+#'@title Create Twitter Bootstrap <%=item_name %>s
+#'
+#'@description Functions to create and update Twitter Bootstrap <%=item_name %>s in shiny
+#'@note Run \code{bsDemo()} for a live example of shinyBS <%=item_name%>s functionality.
+#'@author Eric Bailey
+#'@family <%=low%>
+#'@references \href{http://getbootstrap.com/2.3.2/}{Twitter Bootstrap 2.3.2}
+#'@examples \dontrun{Run bsDemo() for examples}
+#'@export
diff --git a/man-roxygen/component_header.R b/man-roxygen/component_header.R
new file mode 100644
index 0000000..e46e909
--- /dev/null
+++ b/man-roxygen/component_header.R
@@ -0,0 +1,7 @@
+#'<% low <- tolower(item_name) %>
+#'@rdname <%=low %>s
+#'@name <%=item_name %>s
+#'
+#'@title Create Twitter Bootstrap <%=item_name %>s
+#'
+#'@description Functions to create and update Twitter Bootstrap <%=item_name %>s in shiny
diff --git a/man-roxygen/footer.R b/man-roxygen/footer.R
new file mode 100644
index 0000000..1f090c9
--- /dev/null
+++ b/man-roxygen/footer.R
@@ -0,0 +1,5 @@
+#'@note Run \code{bsDemo()} for a live examples of shinyBS functionality.
+#'@author Eric Bailey
+#'@references \href{http://getbootstrap.com}{Twitter Bootstrap 3}
+#'@examples \dontrun{Run bsDemo() for examples}
+#'@export
diff --git a/man-roxygen/subcomponent.R b/man-roxygen/subcomponent.R
new file mode 100644
index 0000000..3abfb62
--- /dev/null
+++ b/man-roxygen/subcomponent.R
@@ -0,0 +1,15 @@
+#'<% low <- tolower(item_name) %>
+#'@rdname <%=gsub("\\s","", low)%>s
+#'@name <%=item_name %>s
+#'
+#'@title Create <%=item_name %>s for Twitter Bootstrap <%=component%>s in shiny
+#'
+#'@description Functions to create <%=item_name%>s for use with Twitter Bootstrap
+#' <%=component%>s in shiny
+#'@note Run \code{bsDemo()} for a live example of shinyBS <%=component%>s
+#' functionality.
+#'@author Eric Bailey
+#'@family <%=tolower(component)%>
+#'@references \href{http://getbootstrap.com/2.3.2/}{Twitter Bootstrap 2.3.2}
+#'@examples \dontrun{Run bsDemo() for examples}
+#'@export
diff --git a/man/Alerts.Rd b/man/Alerts.Rd
new file mode 100644
index 0000000..da860d2
--- /dev/null
+++ b/man/Alerts.Rd
@@ -0,0 +1,72 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsAlert.R
+\name{Alerts}
+\alias{Alerts}
+\alias{bsAlert}
+\alias{closeAlert}
+\alias{createAlert}
+\title{Alerts}
+\usage{
+bsAlert(anchorId)
+
+createAlert(session, anchorId, alertId = NULL, title = NULL,
+ content = NULL, style = NULL, dismiss = TRUE, append = TRUE)
+
+closeAlert(session, alertId)
+}
+\arguments{
+\item{anchorId}{A unique ID that identifies the anchor.}
+
+\item{session}{The \code{session} object passed to function given to
+\code{shinyServer}.}
+
+\item{alertId}{A unique ID that identifies the specific alert being created.}
+
+\item{title}{An optional title for the alert. This will appear at the top of the alert in larger font.}
+
+\item{content}{The main body of the alert. HTML tags are allowed.}
+
+\item{style}{The Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}.}
+
+\item{dismiss}{\code{logical} indicating whether the alert should be user dismissable.}
+
+\item{append}{\code{logical} indicating whether the alert should be appended to the anchor, below any existing alerts.}
+}
+\description{
+Alerts allow you to communicate information to the user on the fly. Standard
+Bootstrap styling options give the user a hint at the type of information
+contained in the Alert.
+}
+\details{
+To create alerts in your Shiny app you must place \code{bsAlert} in your ui.
+This serves as an anchor that tells shinyBS where to place the alerts created
+with \code{createAlert}.
+
+Use \code{createAlert} in your server script to add alerts to the anchor
+you created with \code{bsAlert} in your ui. You can place \code{createAlert}
+in observers, reactives, or outputs. A common usage may be to have logic that
+validates a user's inputs. If they are valid produce the requested output, if
+not use \code{createAlert} to give the user info about what they need to
+change.
+}
+\note{
+Run \code{bsDemo()} for a live examples of shinyBS functionality.
+}
+\section{Changes}{
+
+\code{style} was called \code{type} in previous versions of shinyBS.
+
+\code{anchorId} was called \code{inputId} in previous versions of shinyBS.
+
+\code{content} was called \code{message} in previous versions of shinyBS.
+}
+\examples{
+\dontrun{Run bsDemo() for examples}
+}
+\author{
+Eric Bailey
+}
+\references{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+}
+
diff --git a/shinyBS.Rproj b/shinyBS.Rproj
index 21a4da0..eaa6b81 100644
--- a/shinyBS.Rproj
+++ b/shinyBS.Rproj
@@ -15,3 +15,4 @@ LaTeX: pdfLaTeX
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
+PackageRoxygenize: rd,collate,namespace
From 5e0498ae702d2907b86c6a84f1fc7889c54b545f Mon Sep 17 00:00:00 2001
From: Eric bsAlert() function in the iu.R script. You can then add alerts to this anchor with createAlert() and remove them with closeAlert().append = FALSE in createAlert() the new alert will overwrite any existing alerts. dismiss = FALSE in createAlert(). The alert can then only be removed using closeAlert() (be sure to set alertId when you create the alert) or by creating a new alert with append = FALSE in the same anchor." + data.title + "
";
- }
-
- al = al + data.message + "" + data.title + "
");
+ }
+ if(data.hasOwnProperty("content")) {
+ $alert.append(data.content);
}
-);
-Shiny.addCustomMessageHandler("closeAlert",
- function(alertId) {
- $("#"+alertId).alert('close');
+ if(data.append == true) {
+ $alert.appendTo("#" + data.id);
+ } else {
+ $("#" + data.id).html($alert);
}
-);
+});
+
+Shiny.addCustomMessageHandler("bsAlertClose", function(alertId) {
+ $("#" + alertId).alert('close');
+});
\ No newline at end of file
diff --git a/man-roxygen/component.R b/man-roxygen/component.R
new file mode 100644
index 0000000..3d6b78c
--- /dev/null
+++ b/man-roxygen/component.R
@@ -0,0 +1,14 @@
+#'<% low <- tolower(item_name) %>
+#'<% cn <- gsub("\\s","", low) %>
+#'@rdname <%=cn %>s
+#'@name <%=item_name %>s
+#'
+#'@title Create Twitter Bootstrap <%=item_name %>s
+#'
+#'@description Functions to create and update Twitter Bootstrap <%=item_name %>s in shiny
+#'@note Run \code{bsDemo()} for a live example of shinyBS <%=item_name%>s functionality.
+#'@author Eric Bailey
+#'@family <%=low%>
+#'@references \href{http://getbootstrap.com/2.3.2/}{Twitter Bootstrap 2.3.2}
+#'@examples \dontrun{Run bsDemo() for examples}
+#'@export
diff --git a/man-roxygen/component_header.R b/man-roxygen/component_header.R
new file mode 100644
index 0000000..e46e909
--- /dev/null
+++ b/man-roxygen/component_header.R
@@ -0,0 +1,7 @@
+#'<% low <- tolower(item_name) %>
+#'@rdname <%=low %>s
+#'@name <%=item_name %>s
+#'
+#'@title Create Twitter Bootstrap <%=item_name %>s
+#'
+#'@description Functions to create and update Twitter Bootstrap <%=item_name %>s in shiny
diff --git a/man-roxygen/footer.R b/man-roxygen/footer.R
new file mode 100644
index 0000000..1f090c9
--- /dev/null
+++ b/man-roxygen/footer.R
@@ -0,0 +1,5 @@
+#'@note Run \code{bsDemo()} for a live examples of shinyBS functionality.
+#'@author Eric Bailey
+#'@references \href{http://getbootstrap.com}{Twitter Bootstrap 3}
+#'@examples \dontrun{Run bsDemo() for examples}
+#'@export
diff --git a/man-roxygen/subcomponent.R b/man-roxygen/subcomponent.R
new file mode 100644
index 0000000..3abfb62
--- /dev/null
+++ b/man-roxygen/subcomponent.R
@@ -0,0 +1,15 @@
+#'<% low <- tolower(item_name) %>
+#'@rdname <%=gsub("\\s","", low)%>s
+#'@name <%=item_name %>s
+#'
+#'@title Create <%=item_name %>s for Twitter Bootstrap <%=component%>s in shiny
+#'
+#'@description Functions to create <%=item_name%>s for use with Twitter Bootstrap
+#' <%=component%>s in shiny
+#'@note Run \code{bsDemo()} for a live example of shinyBS <%=component%>s
+#' functionality.
+#'@author Eric Bailey
+#'@family <%=tolower(component)%>
+#'@references \href{http://getbootstrap.com/2.3.2/}{Twitter Bootstrap 2.3.2}
+#'@examples \dontrun{Run bsDemo() for examples}
+#'@export
diff --git a/man/Alerts.Rd b/man/Alerts.Rd
new file mode 100644
index 0000000..da860d2
--- /dev/null
+++ b/man/Alerts.Rd
@@ -0,0 +1,72 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsAlert.R
+\name{Alerts}
+\alias{Alerts}
+\alias{bsAlert}
+\alias{closeAlert}
+\alias{createAlert}
+\title{Alerts}
+\usage{
+bsAlert(anchorId)
+
+createAlert(session, anchorId, alertId = NULL, title = NULL,
+ content = NULL, style = NULL, dismiss = TRUE, append = TRUE)
+
+closeAlert(session, alertId)
+}
+\arguments{
+\item{anchorId}{A unique ID that identifies the anchor.}
+
+\item{session}{The \code{session} object passed to function given to
+\code{shinyServer}.}
+
+\item{alertId}{A unique ID that identifies the specific alert being created.}
+
+\item{title}{An optional title for the alert. This will appear at the top of the alert in larger font.}
+
+\item{content}{The main body of the alert. HTML tags are allowed.}
+
+\item{style}{The Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}.}
+
+\item{dismiss}{\code{logical} indicating whether the alert should be user dismissable.}
+
+\item{append}{\code{logical} indicating whether the alert should be appended to the anchor, below any existing alerts.}
+}
+\description{
+Alerts allow you to communicate information to the user on the fly. Standard
+Bootstrap styling options give the user a hint at the type of information
+contained in the Alert.
+}
+\details{
+To create alerts in your Shiny app you must place \code{bsAlert} in your ui.
+This serves as an anchor that tells shinyBS where to place the alerts created
+with \code{createAlert}.
+
+Use \code{createAlert} in your server script to add alerts to the anchor
+you created with \code{bsAlert} in your ui. You can place \code{createAlert}
+in observers, reactives, or outputs. A common usage may be to have logic that
+validates a user's inputs. If they are valid produce the requested output, if
+not use \code{createAlert} to give the user info about what they need to
+change.
+}
+\note{
+Run \code{bsDemo()} for a live examples of shinyBS functionality.
+}
+\section{Changes}{
+
+\code{style} was called \code{type} in previous versions of shinyBS.
+
+\code{anchorId} was called \code{inputId} in previous versions of shinyBS.
+
+\code{content} was called \code{message} in previous versions of shinyBS.
+}
+\examples{
+\dontrun{Run bsDemo() for examples}
+}
+\author{
+Eric Bailey
+}
+\references{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+}
+
diff --git a/shinyBS.Rproj b/shinyBS.Rproj
index 21a4da0..eaa6b81 100644
--- a/shinyBS.Rproj
+++ b/shinyBS.Rproj
@@ -15,3 +15,4 @@ LaTeX: pdfLaTeX
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
+PackageRoxygenize: rd,collate,namespace
From 656c90a7040898c35860051898b0d204f94d193e Mon Sep 17 00:00:00 2001
From: Eric bsCollapse and the user can hide it when they are done with it and easily bring it back if they need to reference it again.
Collapses are a way to reduce clutter in your Shiny app by allowing users to decide which elements they want visible at any given time. This demo makes extensive use of collapses. Each section is wrapped in a collapse element so that it can be hidden or shown with a click.
", + controls = tagList(checkboxInput("bsCollapseMultiple", "Multiple", value = TRUE), + selectInput("bsCollapseTextStyle", "'Text' Style", choices = c("default", "warning", "danger", "info", "success"), selected = "default"), + selectInput("bsCollapseOutputStyle", "'Shiny Outputs' Style", choices = c("default", "warning", "danger", "info", "success"), selected = "default")), + example = bsCollapse(id = "collapseExample", multiple = TRUE, open = c("Text", "Shiny Outputs"), + bsCollapsePanel("Text", HTML("You may want more explanation or instructions for your Shiny app than is reasonable to display at all times. Wrap this text in absCollapse and the user can hide it when they are done with it and easily bring it back if they need to reference it again.")),
+ bsCollapsePanel("Shiny Outputs", tagList(tags$span("You can embed Shiny outputs into your collapses."), plotOutput("collapsePlot")))
+ )
+ ),
tabPanel("Tab 2",
fluidRow(
column(12,
diff --git a/inst/bsDemo/www/demo.css b/inst/bsDemo/www/demo.css
index 416709e..3804fe5 100644
--- a/inst/bsDemo/www/demo.css
+++ b/inst/bsDemo/www/demo.css
@@ -6,8 +6,6 @@ div.code {
font-family: monospace;
width: 100%;
min-height: 200px;
- border: solid 1px #CCC;
- border-radius: 4px;
margin-bottom: 10px;
padding: 10px;
text-indent: -20px;
diff --git a/inst/tests/bsAlert/global.R b/inst/tests/bsAlert/global.R
deleted file mode 100644
index fb976b7..0000000
--- a/inst/tests/bsAlert/global.R
+++ /dev/null
@@ -1,15 +0,0 @@
-library(shiny)
-library(shinyBS)
-
-anchors <- c("alert1", "alert2")
-
-at <- c(1,2,3,4)
-types <- c("warning", "danger", "info", "success")
-titles <- c("Warning!", "Oh snap!", "Heads up!", "Well done!")
-messages <- c("Best check yo self, you're not looking too good.",
- "Change a few things up and try submitting again. ",
- "This alert needs your attention, but it's not super important. ",
- "You successfully read this important alert message. ")
-dismiss <- c(TRUE, FALSE)
-
-g <- expand.grid(anchors, at, dismiss, stringsAsFactors = FALSE)
diff --git a/inst/tests/bsAlert/server.R b/inst/tests/bsAlert/server.R
deleted file mode 100644
index a14237a..0000000
--- a/inst/tests/bsAlert/server.R
+++ /dev/null
@@ -1,46 +0,0 @@
-shinyServer(function(input, output, session) {
-
- for(r in seq(nrow(g))) {
- id <- paste(g[r, 1], g[r, 2], g[r, 3], sep = "_")
- createAlert(session, g[r, 1], id, style = types[g[r, 2]], title = titles[g[r, 2]], content = messages[g[r, 2]], dismiss = g[r, 3])
- }
-
- observe({
- if(input$but1 > 0) {
- for(r in seq(nrow(g))) {
- id <- paste("post", g[r, 1], g[r, 2], g[r, 3], sep = "_")
- createAlert(session, g[r, 1], id, style = types[g[r, 2]], title = titles[g[r, 2]], content = messages[g[r, 2]], dismiss = g[r, 3])
- }
- }
- })
-
- observe({
- if(input$but2 > 0) {
- for(r in seq(nrow(g))) {
- id <- paste("post", g[r, 1], g[r, 2], g[r, 3], sep = "_")
- closeAlert(session, id)
- }
- }
- })
-
- observe({
- if(input$but3 > 0) {
- createAlert(session, "alert2", "appender", "Information", "This information alert should overwrite alert anchor #2.", append = FALSE)
- }
- })
-
- observe({
- closeAlert(session, "text_test")
- x <- as.numeric(input$text1)
- if(is.na(x)) {
- createAlert(session, "textAlert", "text_test", title = "Text Test", "You must enter numeric input!", style = "info")
- } else if(x > 100) {
- createAlert(session, "textAlert", "text_test", title = "Text Test", "Congratulations! You entered a number above 100!", style = "success")
- } else {
- createAlert(session, "textAlert", "text_test", title = "Text Test", "Danger! You have entered a number less than or equal to 100!", style = "danger")
- }
-
-
- })
-
-})
\ No newline at end of file
diff --git a/inst/tests/bsAlert/ui.R b/inst/tests/bsAlert/ui.R
deleted file mode 100644
index 293913c..0000000
--- a/inst/tests/bsAlert/ui.R
+++ /dev/null
@@ -1,22 +0,0 @@
-
-library(shiny)
-library(shinyBS)
-
-shinyUI(fluidPage(
- fluidRow(tags$head(tags$title("shinyBS Alerts Test")),
- column(width = 4,
- actionButton("but1", "Add Alerts"),
- actionButton("but2", "Remove Alerts"),
- actionButton("but3", "Append = FALSE"),
- textInput("text1", "Text Input"),
- bsAlert("textAlert")
- ),
- column(width = 4,
- bsAlert("alert1")
- ),
- column(width = 4,
- bsAlert("alert2")
- )
- )
- )
-)
\ No newline at end of file
diff --git a/inst/tests/tests_alert.R b/inst/tests/tests_alert.R
deleted file mode 100644
index bbd0cc2..0000000
--- a/inst/tests/tests_alert.R
+++ /dev/null
@@ -1,132 +0,0 @@
-context("Alerts")
-
-devtools::install_github("ebailey78/shinyBS", ref = "shinyBS3-new")
-appDir = file.path(system.file(package = "shinyBS"), "tests", "bsAlert")
-
-# shinyapps::deployApp(appDir)
-
-source(file.path(appDir, "global.R"))
-
-RSelenium::startServer()
-
-remDr <- RSelenium::remoteDriver(port = 2015)
-remDr$open(silent = TRUE)
-remDr$navigate("https://ebailey78.shinyapps.io/bsAlert/")
-
-#Convenience Functions
-id <- findElement(remDr, "id")
-css <- findElement(remDr, "css selector")
-
-test_that("can connect to app", {
- appTitle <- remDr$getTitle()[[1]]
- expect_equal(appTitle, "shinyBS Alerts Test")
-})
-
-test_that("alert anchors created", {
-
- expect_true(elementExists(remDr, "alert1"))
- expect_true(elementExists(remDr, "alert2"))
- expect_false(elementExists(remDr, "alert3"))
-
- expect_equal(getTag(id("alert1")), "div")
- expect_equal(getTag(id("alert2")), "div")
- expect_true(hasClass(id("alert1"), "tbs-alert"))
- expect_true(hasClass(id("alert2"), "tbs-alert"))
-
-})
-
-test_that("Alerts created on load", {
- for(r in seq(nrow(g))) {
- aid <- paste(g[r, 1], g[r, 2], g[r, 3], sep = "_")
- expect_true(elementExists(remDr, aid), label = aid, info = "existence check")
- expect_true(hasClass(id(aid), paste0("alert-", types[g[r, 2]])), label = aid, info = "style check")
- expect_equal(childExists(id(aid), "css selector", "button.close"), g[r, 3], label = aid, info = paste("dismiss check:", g[r, 3]))
- }
-})
-
-test_that("Alerts created after load", {
-
- # First test to make sure batch 4 doesn't already exist
- for(r in seq(nrow(g))) {
- aid <- paste("post", g[r, 1], g[r, 2], g[r, 3], sep = "_")
- expect_false(elementExists(remDr, aid), label = aid, info = "non-existence check")
- }
-
- # Click the button that creates the new alerts
- id("but1")$clickElement()
-
- Sys.sleep(0.5)
-
- # Check if alert exists now
- for(r in seq(nrow(g))) {
- aid <- paste("post", g[r, 1], g[r, 2], g[r, 3], sep = "_")
- expect_true(elementExists(remDr, aid), label = aid, info = "existence check")
- expect_true(hasClass(id(aid), paste0("alert-", types[g[r, 2]])), label = aid, info = "style check")
- expect_equal(childExists(id(aid), "css selector", "button.close"), g[r, 3], label = aid, info = paste("dismiss check:", g[r, 3]))
- }
-
-})
-
-test_that("closeAlert works", {
-
- # Check if alert still exist
- for(r in seq(nrow(g))) {
- aid <- paste("post", g[r, 1], g[r, 2], g[r, 3], sep = "_")
- expect_true(elementExists(remDr, aid), label = aid, info = "existence check")
- expect_true(hasClass(id(aid), paste0("alert-", types[g[r, 2]])), label = aid, info = "style check")
- expect_equal(childExists(id(aid), "css selector", "button.close"), g[r, 3], label = aid, info = paste("dismiss check:", g[r, 3]))
- }
-
- # Click the button that closes the alerts
- id("but2")$clickElement()
-
- # Check if the new alerts have disappeared but not the old
- for(r in seq(nrow(g))) {
- aid <- paste(g[r, 1], g[r, 2], g[r, 3], sep = "_")
- expect_false(elementExists(remDr, paste0("post_", aid)), label = aid, info = "non-existence check")
- expect_true(elementExists(remDr, aid), label = aid, info = "existence check")
- }
-
-})
-
-test_that("close button works", {
- g2 <- g[g[,3] == TRUE, ]
- for(r in seq(nrow(g2))) {
- aid <- paste(g[r, 1], g[r, 2], g[r, 3], sep = "_")
- if(elementExists(remDr, aid)) {
- expect_true(elementExists(remDr, aid), label = aid, info = "pre-check")
- findChild("css selector")(id(aid), "button.close")$clickElement()
- expect_false(elementExists(remDr, aid), label = aid, info = "post-check")
- }
- }
-})
-
-test_that("append works", {
-
- a2 <- id("alert2")
- id("but2")$clickElement()
- start <- length(findChildren("css selector")(a2, "div.alert"))
- id("but1")$clickElement()
- expect_more_than(length(findChildren("css selector")(a2, "div.alert")), start)
- id("but3")$clickElement()
- expect_equal(length(findChildren("css selector")(a2, "div.alert")), 1)
-
-})
-
-test_that("textInput alert", {
- txt <- id("text1")
- #Make Sure textInput is empty
- txt$clearElement()
- expect_true(hasClass(id("text_test"), "alert-info"))
- txt$sendKeysToElement(list("50"))
- Sys.sleep(0.5)
- expect_true(hasClass(id("text_test"), "alert-danger"))
- txt$sendKeysToElement(list("0"))
- Sys.sleep(0.5)
- expect_true(hasClass(id("text_test"), "alert-success"))
-})
-
-
-
-remDr$close()
-close(remoteApp)
diff --git a/inst/www/shinyBS.js b/inst/www/shinyBS.js
index dcd4ea7..6fb6ba8 100644
--- a/inst/www/shinyBS.js
+++ b/inst/www/shinyBS.js
@@ -1,5 +1,74 @@
var shinyBS = {inputBindings: {}};
+shinyBS.inputBindings.collapse = new Shiny.InputBinding();
+$.extend(shinyBS.inputBindings.collapse, {
+ find: function(scope) {
+ return $(scope).find("sbs-panel-group");
+ },
+ getValue: function(el) {
+ return $(el).data("sbs-value");
+ },
+ receiveMessage: function(el, data) {
+ var $el = $(el);
+ if(data.hasOwnProperty('multiple')) {
+ if(data.multiple) {
+ $el.find(".collapse").each(function(i) {$(this).collapse({parent: false, toggle: false})});
+ } else {
+ $el.find(".collapse").each(function(i) {$(this).collapse({parent: "#"+$el.attr("id"), toggle: false})});
+ }
+ }
+ if(data.hasOwnProperty('style')) {
+ panels = Object.keys(data.style)
+ for(var i = 0; i < panels.length; i++) {
+ $el.find("#" + panels[i]).parent().attr("class", "panel panel-" + data.style[panels[i]])
+ }
+ }
+ if(data.hasOwnProperty('open')) {
+ if(!Array.isArray(data.open)) {
+ data.open = [data.open]
+ }
+ data.open.forEach(function(value, index, array) {
+ $el.find("#" + value).collapse("show");
+ })
+ }
+ if(data.hasOwnProperty("close")) {
+ if(!Array.isArray(data.close)) {
+ data.close = [data.close];
+ }
+ data.close.forEach(function(value, index, array) {
+ $el.find("#" + value).collapse("hide");
+ })
+ }
+ },
+ subscribe: function(el, callback) {
+ $(el).find(".collapse").on("shown.bs.collapse hidden.bs.collapse", callback);
+ },
+ initialize: function(el) {
+ var $el = $(el);
+ var $panels = $el.find(".panel");
+ var val = [];
+ $panels.each(function(i) {
+ if($(this).find("div.panel-collapse.collapse").hasClass("in")) {
+ val.push($(this).attr("value"));
+ }
+ });
+ $el.data("sbs-value", val);
+ $panels.on("show.bs.collapse", function(event) {
+ var val = $el.data("sbs-value");
+ val.push($(this).attr("value"));
+ $el.data("sbs-value", val)
+ });
+ $panels.on("hide.bs.collapse", function(event) {
+ var val = $el.data("sbs-value");
+ var i = val.indexOf($(this).attr("value"))
+ if(i != -1) {
+ val.splice(i, 1);
+ $el.data("sbs-value", val);
+ }
+ });
+ }
+})
+
Shiny.addCustomMessageHandler("bsAlertCreate", function(data) {
var $alert = $("");
diff --git a/man-roxygen/group_footer.R b/man-roxygen/group_footer.R
new file mode 100644
index 0000000..7785e92
--- /dev/null
+++ b/man-roxygen/group_footer.R
@@ -0,0 +1,3 @@
+#'@note Run \code{bsDemo()} for a live examples of shinyBS functionality.
+#'@references \href{http://getbootstrap.com}{Twitter Bootstrap 3}
+#'@export
diff --git a/man/Alerts.Rd b/man/Alerts.Rd
index da860d2..a293ee7 100644
--- a/man/Alerts.Rd
+++ b/man/Alerts.Rd
@@ -26,7 +26,7 @@ closeAlert(session, alertId)
\item{content}{The main body of the alert. HTML tags are allowed.}
-\item{style}{The Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}.}
+\item{style}{A Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}.}
\item{dismiss}{\code{logical} indicating whether the alert should be user dismissable.}
diff --git a/man/Collapses.Rd b/man/Collapses.Rd
new file mode 100644
index 0000000..4e53437
--- /dev/null
+++ b/man/Collapses.Rd
@@ -0,0 +1,30 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsCollapse.R
+\name{Collapses}
+\alias{Collapses}
+\title{Collapse Panels}
+\description{
+Collapse panels allow you to reduce clutter in your Shiny app by making
+panels of information that open and close with a user's click. Any type of
+content can go in a collapse panel. Standard Bootstrap styling options are
+available.
+}
+\note{
+Run \code{bsDemo()} for a live examples of shinyBS functionality.
+}
+\section{Components}{
+
+\describe{
+ \item{\code{\link{bsCollapse}}}{A container for holder the individual panels created by \code{\link{bsCollapsePanel}}.}
+ \item{\code{\link{bsCollapsePanel}}}{Creates an individual Collapse Panel that resides within a \code{\link{bsCollapse}}.}
+ \item{\code{\link{updateCollapse}}}{Used within your server logic to open/close collapse panels or change their style.}
+}
+}
+\references{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+}
+\seealso{
+Other Collapses: \code{\link{bsCollapsePanel}};
+ \code{\link{bsCollapse}}; \code{\link{updateCollapse}}
+}
+
diff --git a/man/bsCollapse.Rd b/man/bsCollapse.Rd
new file mode 100644
index 0000000..9a0e717
--- /dev/null
+++ b/man/bsCollapse.Rd
@@ -0,0 +1,43 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsCollapse.R
+\name{bsCollapse}
+\alias{bsCollapse}
+\title{bsCollapse}
+\usage{
+bsCollapse(..., id = NULL, multiple = FALSE, open = NULL)
+}
+\arguments{
+\item{id}{If provided, you can use input$id in your server script to open or
+close \code{bsCollapsePanels} within the \code{bsCollapse}.}
+
+\item{multiple}{\code{logical} indication whether multiple \code{bsCollapsePanels}
+within this \code{bsCollapse} can be open at once.}
+
+\item{open}{The \code{value} (or, if none was supplied, the title) of the
+\code{bsCollapsePanel} that should be open. If \code{multiple = TRUE}, then
+this can be a vector of \code{value}s or \code{title}s.}
+
+\item{\dots}{\code{\link{bsCollapsePanel}} elements to include in the \code{bsCollapse}.}
+}
+\description{
+Create a collapse that contains \code{\link{bsCollapsePanel}} elements.
+See \code{\link{Collapses}}
+}
+\note{
+Run \code{bsDemo()} for a live examples of shinyBS functionality.
+}
+\examples{
+\dontrun{Run bsDemo() for examples}
+}
+\author{
+Eric Bailey
+}
+\references{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+}
+\seealso{
+Other Collapses: \code{\link{Collapses}};
+ \code{\link{bsCollapsePanel}};
+ \code{\link{updateCollapse}}
+}
+
diff --git a/man/bsCollapsePanel.Rd b/man/bsCollapsePanel.Rd
new file mode 100644
index 0000000..31f3602
--- /dev/null
+++ b/man/bsCollapsePanel.Rd
@@ -0,0 +1,39 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsCollapse.R
+\name{bsCollapsePanel}
+\alias{bsCollapsePanel}
+\title{bsCollapsePanel}
+\usage{
+bsCollapsePanel(title, ..., value = title, style = NULL)
+}
+\arguments{
+\item{title}{The title to display at the top of the \code{bsCollapsePanel}}
+
+\item{value}{The value that should be returned to the server when this
+\code{bsCollapsePanel} is open.}
+
+\item{style}{A Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}.}
+
+\item{\dots}{UI elements to include within the collapse panel}
+}
+\description{
+Create a collapse panel that can be included within a \code{\link{bsCollapse}}
+See \code{\link{Collapses}}
+}
+\note{
+Run \code{bsDemo()} for a live examples of shinyBS functionality.
+}
+\examples{
+\dontrun{Run bsDemo() for examples}
+}
+\author{
+Eric Bailey
+}
+\references{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+}
+\seealso{
+Other Collapses: \code{\link{Collapses}};
+ \code{\link{bsCollapse}}; \code{\link{updateCollapse}}
+}
+
diff --git a/man/updateCollapse.Rd b/man/updateCollapse.Rd
new file mode 100644
index 0000000..bc1741b
--- /dev/null
+++ b/man/updateCollapse.Rd
@@ -0,0 +1,44 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsCollapse.R
+\name{updateCollapse}
+\alias{updateCollapse}
+\title{updateCollapse}
+\usage{
+updateCollapse(session, id, open = NULL, close = NULL, style = NULL)
+}
+\arguments{
+\item{session}{The \code{session} object passed to function given to
+\code{shinyServer}.}
+
+\item{id}{The id of the \code{\link{bsCollapse}} object you want to change.}
+
+\item{open}{A vector of \code{value} (or \code{title} if no \code{value} was provided)
+of the \code{\link{bsCollapsePanel}} elements you want to open.}
+
+\item{close}{A vector of \code{value} (or \code{title} if no \code{value} was provided)
+of the \code{\link{bsCollapsePanel}} elements you want to close.}
+
+\item{style}{A named list of Bootstrap styles (danger, info, warning, success, default).
+The names should correspond the the \code{value} of the \code{\link{bsCollapsePanel}} you
+want to change.}
+}
+\description{
+Open or close collapse panels or change their styles. See \code{\link{Collapses}}
+}
+\note{
+Run \code{bsDemo()} for a live examples of shinyBS functionality.
+}
+\examples{
+\dontrun{Run bsDemo() for examples}
+}
+\author{
+Eric Bailey
+}
+\references{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+}
+\seealso{
+Other Collapses: \code{\link{Collapses}};
+ \code{\link{bsCollapsePanel}}; \code{\link{bsCollapse}}
+}
+
From f67e9303f947eb727f8f8c608e08810b12f1e03a Mon Sep 17 00:00:00 2001
From: Eric updateCollapse."),
+#' actionButton("p1Button", "Push Me!"),
+#' selectInput("styleSelect", "Select style for Panel 1",
+#' c("default", "primary", "danger", "warning", "info", "success"))
+#' ),
+#' mainPanel(
+#' bsCollapse(id = "collapseExample", open = "Panel 2",
+#' bsCollapsePanel("Panel 1", "This is a panel with just text ",
+#' "and has the default style. You can change the style in ",
+#' "the sidebar.", style = "info"),
+#' bsCollapsePanel("Panel 2", "This panel has a generic plot. "
+#' "and a 'success' style.", plotOutput("genericPlot"), style = "success")
+#' )
+#' )
+#' )
+#' ),
+#' server = function(input, output, session) {
+#' output$genericPlot <- renderPlot(plot(rnorm(100)))
+#' observeEvent(input$p1Button, ({
+#' updateCollapse(session, "collapseExample", open = "Panel 1")
+#' }))
+#' observeEvent(input$styleSelect, ({
+#' updateCollapse(session, "collapseExample", style = list("Panel 1" = input$styleSelect))
+#' }))
+#' }
+#')
+#'}
+#'@templateVar item_name Collapses
+#'@templateVar family_name Collapses
+#'@template footer
+NULL
diff --git a/R/Modals.R b/R/Modals.R
new file mode 100644
index 0000000..4f77aa4
--- /dev/null
+++ b/R/Modals.R
@@ -0,0 +1,90 @@
+#'Modals
+#'
+#'Modal windows are similar to popups but are rendered within the
+#'original window. They can contain any combination of shiny inputs, shiny
+#'outputs, and html. Possible uses include extra controls that you don't want
+#'cluttering up the main app display or help pages to explain your apps
+#'operation.
+#'
+#'@section Components:
+#'There are only two functions in the Modals family:
+#' \describe{
+#' \item{\code{\link{bsModal}}}{Used in the UI to create a modal window.}
+#' \item{\code{\link{toggleModal}}}{Used in the Server logic to open or
+#' close a modal window programmatically.}
+#' }
+#'
+#'@details
+#'Use \code{\link{bsModal}} in your UI to create a modal window. It works
+#'like \code{\link{Collapses}} or \code{\link{tabPanel}}, any non-named arguments
+#'will be passed as content for the modal.
+#'
+#'Create a button or link and assign its \code{inputId} as the \code{trigger}
+#'in \code{\link{bsModal}}.
+#'
+#'@section Changes:
+#'There is now a \code{toggle} argument in \code{\link{toggleModal}} that allows
+#'you to specify whether you want the modal to open or close.
+#'
+#'The \code{size} argument in \code{\link{bsModal}} allows you to specify the
+#'size of the modal window. Either \code{small} or \code{large}.
+#'
+#'@examples
+#'\donttest{
+#'library(shiny)
+#'library(shinyBS)
+#'
+#'shinyApp(
+#' ui = fluidPage(
+#' sidebarLayout(
+#' sidebarPanel(
+#' sliderInput("bins",
+#' "Number of bins:",
+#' min = 1,
+#' max = 50,
+#' value = 30),
+#' actionButton("tabBut", "View Table")
+#' ),
+#'
+#' mainPanel(
+#' plotOutput("distPlot"),
+#' bsModal("modalExample", "Data Table", "tabBut", size = "large",
+#' dataTableOutput("distTable"))
+#' )
+#' )
+#' ),
+#' server = function(input, output, session) {
+#'
+#' output$distPlot <- renderPlot({
+#'
+#' x <- faithful[, 2]
+#' bins <- seq(min(x), max(x), length.out = input$bins + 1)
+#'
+#' # draw the histogram with the specified number of bins
+#' hist(x, breaks = bins, col = 'darkgray', border = 'white')
+#'
+#' })
+#'
+#' output$distTable <- renderDataTable({
+#'
+#' x <- faithful[, 2]
+#' bins <- seq(min(x), max(x), length.out = input$bins + 1)
+#'
+#' # draw the histogram with the specified number of bins
+#' tab <- hist(x, breaks = bins, plot = FALSE)
+#' tab$breaks <- sapply(seq(length(tab$breaks) - 1), function(i) {
+#' paste0(signif(tab$breaks[i], 3), "-", signif(tab$breaks[i+1], 3))
+#' })
+#' tab <- as.data.frame(do.call(cbind, tab))
+#' colnames(tab) <- c("Bins", "Counts", "Density")
+#' return(tab[, 1:3])
+#'
+#' }, options = list(pageLength=10))
+#'
+#' }
+#')
+#'}
+#'@templateVar family_name Modals
+#'@templateVar item_name Modals
+#'@template footer
+NULL
diff --git a/R/Tooltips.R b/R/Tooltips.R
new file mode 100644
index 0000000..1dfe566
--- /dev/null
+++ b/R/Tooltips.R
@@ -0,0 +1,140 @@
+#'Tooltips and Popovers
+#'
+#'Tooltips and Popovers allow you to add additional information about controls
+#'or outputs without cluttering up your user interface. You can add a tooltip to
+#'a button that displays on hover and better explains what the button will do, or
+#'you could add a popover to an output providing further analysis of that output.
+#'
+#'@section Components:
+#'There are six functions in the Tooltips and Popovers family:
+#' \describe{
+#' \item{\code{\link{bsTooltip}}}{Used in the UI to add a tooltip to an element
+#' in your UI.}
+#' \item{\code{\link{bsPopover}}}{Used in the UI to add a popover to an element
+#' in your UI.}
+#' \item{\code{\link{addTooltip}}}{Used in the Server logic to add a tooltip
+#' to an element in your UI.}
+#' \item{\code{\link{addPopover}}}{Used in the Server logic to add a popover
+#' to an element in your UI.}
+#' \item{\code{\link{removeTooltip}}}{Used in the Server logic to remove a
+#' tooltip from an element in your UI.}
+#' \item{\code{\link{removePopover}}}{Used in the Server logic to remove a
+#' popover from an element in your UI.}
+#' }
+#'
+#'@details
+#'You can create tooltips and popovers from either the UI script or within the
+#'Server logic. \code{\link{bsTooltip}} and \code{\link{bsPopover}} are used in
+#'the UI, and \code{\link{addTooltip}} and \code{\link{addPopover}} are used in
+#'the Server logic.
+#'
+#'@note
+#'Tooltips and Popovers cannot contain shiny inputs or outputs.
+#'
+#'There must be at least one \code{shinyBS} component in the UI of your
+#'app in order for the necessary dependencies to be loaded. Because of this,
+#'\code{\link{addTooltip}} and \code{\link{addPopover}} will not work if they
+#'are the only shinyBS components in your app.
+#'
+#'Tooltips and popovers may not work on some of the more complex shiny inputs
+#'or outputs. If you encounter a problem with tooltips or popovers not appearing
+#'please file a issue on the github page so I can fix it.
+#'
+#'@section Changes:
+#'An \code{options} argument has been added to the creation functions to allow
+#'advanced users more control over how the tooltips and popovers appear. See
+#'the \href{http://getbootstrap.com}{Twitter Bootstrap 3 documentation} for more
+#'details.
+#'
+#'@examples
+#'\donttest{
+#'library(shiny)
+#'library(shinyBS)
+#'shinyApp(
+#' ui = fluidPage(
+#' sidebarLayout(
+#' sidebarPanel(
+#' sliderInput("bins",
+#' "Number of bins:",
+#' min = 1,
+#' max = 50,
+#' value = 30),
+#' bsTooltip("bins", "The wait times will be broken into this many equally spaced bins",
+#' "right", options = list(container = "body"))
+#' ),
+#' mainPanel(
+#' plotOutput("distPlot")
+#' )
+#' )
+#' ),
+#' server = function(input, output, session) {
+#' output$distPlot <- renderPlot({
+#'
+#' # generate bins based on input$bins from ui.R
+#' x <- faithful[, 2]
+#' bins <- seq(min(x), max(x), length.out = input$bins + 1)
+#'
+#' # draw the histogram with the specified number of bins
+#' hist(x, breaks = bins, col = 'darkgray', border = 'white')
+#'
+#' })
+#' addPopover(session, "distPlot", "Data", content = paste0("Waiting time between ", +#' "eruptions and the duration of the eruption for the Old Faithful geyser ", +#' "in Yellowstone National Park, Wyoming, USA.
Azzalini, A. and ", +#' "Bowman, A. W. (1990). A look at some data on the Old Faithful geyser. ", +#' "Applied Statistics 39, 357-365.
"), trigger = 'click') +#' } +#') +#'} +#'@templateVar item_name Tooltips_and_Popovers +#'@templateVar family_name Tooltips_and_Popovers +#'@template footer +NULL + + +## These Functions are common to multiple tooltip and popover functions +# Shared functions with really long names... +createTooltipOrPopoverOnServer <- function(session, id, type, options) { + + data <- list(action = "add", type = type, id = id, options = options) + session$sendCustomMessage(type = "updateTooltipOrPopover", data) + +} + +createTooltipOrPopoverOnUI <- function(id, type, options) { + + options = paste0("{'", paste(names(options), options, sep = "': '", collapse = "', '"), "'}") + + bsTag <- shiny::tags$script(paste0("$(document).ready(function() {setTimeout(function() {shinyBS.addTooltip('", id, "', '", type, "', ", options, ")}, 100)});")) + htmltools::attachDependencies(bsTag, shinyBSDep) + +} + +buildTooltipOrPopoverOptionsList <- function(title, placement, trigger, options, content) { + + if(is.null(options)) { + options = list() + } + + if(!missing(content)) { + if(is.null(options$content)) { + options$content = content + } + } + + if(is.null(options$placement)) { + options$placement = placement + } + + if(is.null(options$trigger)) { + if(length(trigger) > 1) trigger = paste(trigger, collapse = " ") + options$trigger = trigger + } + + if(is.null(options$title)) { + options$title = title + } + + return(options) + +} \ No newline at end of file diff --git a/R/addPopover.R b/R/addPopover.R new file mode 100644 index 0000000..c90a2e1 --- /dev/null +++ b/R/addPopover.R @@ -0,0 +1,26 @@ +#'addPopover +#' +#'\code{addPopover} is used within the Server logic of an app to add a popover to a Shiny +#'input or output. +#' +#'@param session The session object passed to function given to shinyServer. +#'@param id The id of the element to attach the popover to. +#'@param title The title of the popover. +#'@param content The main content of the popover. +#'@param placement Where the popover should appear relative to its target +#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}. +#'@param trigger What action should cause the popover to appear? (\code{hover}, +#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}. +#'@param options A named list of additional options to be set on the popover. +#' +#'@templateVar item_name addPopover +#'@templateVar family_name Tooltips_and_Popovers +#'@template item_details +#'@template footer +#'@export +addPopover <- function(session, id, title, content, placement = "bottom", trigger = "hover", options = NULL) { + + options <- buildTooltipOrPopoverOptionsList(title, placement, trigger, options, content) + createTooltipOrPopoverOnServer(session, id, "popover", options) + +} \ No newline at end of file diff --git a/R/addTooltip.R b/R/addTooltip.R new file mode 100644 index 0000000..c7f8791 --- /dev/null +++ b/R/addTooltip.R @@ -0,0 +1,25 @@ +#'addTooltip +#' +#'\code{addTooltip} is used within the Server logic of an app to add a tooltip to a Shiny +#'input or output. +#' +#'@param session The session object passed to function given to shinyServer. +#'@param id The id of the element to attach the tooltip to. +#'@param title The content of the tooltip. +#'@param placement Where the tooltip should appear relative to its target +#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}. +#'@param trigger What action should cause the tooltip to appear? (\code{hover}, +#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}. +#'@param options A named list of additional options to be set on the tooltip. +#' +#'@templateVar item_name addTooltip +#'@templateVar family_name Tooltips_and_Popovers +#'@template item_details +#'@template footer +#'@export +addTooltip <- function(session, id, title, placement = "bottom", trigger = "hover", options = NULL) { + + options <- buildTooltipOrPopoverOptionsList(title, placement, trigger, options) + createTooltipOrPopoverOnServer(session, id, "tooltip", options) + +} \ No newline at end of file diff --git a/R/bsAlert.R b/R/bsAlert.R index 971b051..dccc532 100644 --- a/R/bsAlert.R +++ b/R/bsAlert.R @@ -1,68 +1,18 @@ -#' Alerts -#' -#' Alerts allow you to communicate information to the user on the fly. Standard -#' Bootstrap styling options give the user a hint at the type of information -#' contained in the Alert. -#' -#' @param anchorId A unique ID that identifies the anchor. -#' @param alertId A unique ID that identifies the specific alert being created. -#' @param title An optional title for the alert. This will appear at the top of the alert in larger font. -#' @param content The main body of the alert. HTML tags are allowed. -#' @param style A Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}. -#' @param dismiss \code{logical} indicating whether the alert should be user dismissable. -#' @param append \code{logical} indicating whether the alert should be appended to the anchor, below any existing alerts. -#' @inheritParams shiny::updateTextInput -#' @name Alerts -#' -#' @details -#' To create alerts in your Shiny app you must place \code{bsAlert} in your ui. -#' This serves as an anchor that tells shinyBS where to place the alerts created -#' with \code{createAlert}. -#' -#' Use \code{createAlert} in your server script to add alerts to the anchor -#' you created with \code{bsAlert} in your ui. You can place \code{createAlert} -#' in observers, reactives, or outputs. A common usage may be to have logic that -#' validates a user's inputs. If they are valid produce the requested output, if -#' not use \code{createAlert} to give the user info about what they need to -#' change. -#' -#' @section Changes: -#' \code{style} was called \code{type} in previous versions of shinyBS. -#' -#' \code{anchorId} was called \code{inputId} in previous versions of shinyBS. -#' -#' \code{content} was called \code{message} in previous versions of shinyBS. -#' -#' @template footer -NULL - -#'@rdname Alerts +#'bsAlert +#' +#'\code{bsAlert} creates an anchor point in your UI definition. This anchor point +#'is where alerts created in your Server logic will be displayed. +#' +#'@param anchorId A unique id the identifies the anchor. +#' +#'@templateVar item_name bsAlert +#'@templateVar family_name Alerts +#'@template item_details +#'@template footer #'@export bsAlert <- function(anchorId) { bsTag <- shiny::tags$div(class = "sbs-alert", id = anchorId, " ") - htmltools::attachDependencies(bsTag, shinyBSDep) - -} - -#'@rdname Alerts -#'@export -createAlert <- function(session, anchorId, alertId = NULL, title=NULL, - content=NULL, style=NULL, dismiss=TRUE, append=TRUE) { - - data <- dropNulls(list(id = anchorId, alertId = alertId, title = title, - content = content, style = style, dismiss = dismiss, - append = append)) - - session$sendCustomMessage(type="bsAlertCreate", data) } - -#'@rdname Alerts -#'@export -closeAlert <- function(session, alertId) { - - session$sendCustomMessage(type="bsAlertClose", alertId) - -} \ No newline at end of file diff --git a/R/bsCollapse.R b/R/bsCollapse.R index 4dd3aa8..8dc1ec8 100644 --- a/R/bsCollapse.R +++ b/R/bsCollapse.R @@ -1,38 +1,23 @@ -#' Collapse Panels -#' -#' Collapse panels allow you to reduce clutter in your Shiny app by making -#' panels of information that open and close with a user's click. Any type of -#' content can go in a collapse panel. Standard Bootstrap styling options are -#' available. -#' -#'@section Components: -#' \describe{ -#' \item{\code{\link{bsCollapse}}}{A container for holder the individual panels created by \code{\link{bsCollapsePanel}}.} -#' \item{\code{\link{bsCollapsePanel}}}{Creates an individual Collapse Panel that resides within a \code{\link{bsCollapse}}.} -#' \item{\code{\link{updateCollapse}}}{Used within your server logic to open/close collapse panels or change their style.} -#'} -#'@family Collapses -#'@name Collapses -#'@template group_footer -NULL - -#' bsCollapse +#'bsCollapse #' -#' Create a collapse that contains \code{\link{bsCollapsePanel}} elements. -#' See \code{\link{Collapses}} -#' -#'@param id If provided, you can use input$id in your server script to open or -#' close \code{bsCollapsePanels} within the \code{bsCollapse}. -#'@param multiple \code{logical} indication whether multiple \code{bsCollapsePanels} -#' within this \code{bsCollapse} can be open at once. -#'@param open The \code{value} (or, if none was supplied, the title) of the -#' \code{bsCollapsePanel} that should be open. If \code{multiple = TRUE}, then -#' this can be a vector of \code{value}s or \code{title}s. -#'@param \dots \code{\link{bsCollapsePanel}} elements to include in the \code{bsCollapse}. -#'@family Collapses +#'\code{bsCollapse} is used in your UI to create a collapse panel group. Use +#'\code{\link{bsCollapsePanel}} to populate this object with panels. +#' +#'@param \dots \code{\link{bsCollapsePanel}} elements to include in the Collapse. +#'@param id \bold{Optional} You can use \code{input$id} in your Server logic to +#'determine which panels are open, and \code{\link{updateCollapse}} to open/close +#'panels. +#'@param multiple Can more than one panel be open at a time? Defaults to \code{FALSE}. +#'@param open The \code{value}, (or if none was supplied, the \code{title}) of +#'the panel(s) you want open on load. +#' +#'@templateVar item_name bsCollapse +#'@templateVar family_name Collapses +#'@template item_details #'@template footer #'@export bsCollapse <- function(..., id = NULL, multiple = FALSE, open = NULL) { + if(is.null(id)) id = paste0("collapse", sprintf("%07i", as.integer(stats::runif(1, 1, 1000000)))) if(!multiple & length(open) > 1) { @@ -50,70 +35,8 @@ bsCollapse <- function(..., id = NULL, multiple = FALSE, open = NULL) { } } - bsTag <- tags$div(class = "panel-group sbs-panel-group", id=id, role = "tablist", panels) - htmltools::attachDependencies(bsTag, shinyBSDep) - -} - -#' bsCollapsePanel -#' -#' Create a collapse panel that can be included within a \code{\link{bsCollapse}} -#' See \code{\link{Collapses}} -#' -#'@param title The title to display at the top of the \code{bsCollapsePanel} -#'@param value The value that should be returned to the server when this -#' \code{bsCollapsePanel} is open. -#'@param \dots UI elements to include within the collapse panel -#'@inheritParams Alerts -#'@family Collapses -#'@template footer -#'@export -bsCollapsePanel <- function(title, ..., value = title, style = NULL) { - - content <- list(...) - - id <- paste0("cpanel", sprintf("%07i", as.integer(stats::runif(1, 1, 1000000)))) - if(is.null(value)) { - value = title - } - if(is.null(style)) { - style = "default" - } - - bsTag <- tags$div(class = paste0("panel panel-", style), value = value, - tags$div(class = "panel-heading", role = "tab", id = paste0("heading_", id), - tags$h4(class = "panel-title", - tags$a("data-toggle" = "collapse", href = paste0("#", id), title) - ) - ), - tags$div(id = id, class = "panel-collapse collapse", role = "tabpanel", - tags$div(class = "panel-body", content) - ) - ) + bsTag <- shiny::tags$div(class = "panel-group sbs-panel-group", id=id, role = "tablist", panels) htmltools::attachDependencies(bsTag, shinyBSDep) } - -#' updateCollapse -#' -#' Open or close collapse panels or change their styles. See \code{\link{Collapses}} -#' -#'@param id The id of the \code{\link{bsCollapse}} object you want to change. -#'@param open A vector of \code{value} (or \code{title} if no \code{value} was provided) -#'of the \code{\link{bsCollapsePanel}} elements you want to open. -#'@param close A vector of \code{value} (or \code{title} if no \code{value} was provided) -#'of the \code{\link{bsCollapsePanel}} elements you want to close. -#'@param style A named list of Bootstrap styles (danger, info, warning, success, default). -#'The names should correspond the the \code{value} of the \code{\link{bsCollapsePanel}} you -#'want to change. -#'@inheritParams Alerts -#'@family Collapses -#'@template footer -#'@export -updateCollapse <- function(session, id, open = NULL, close = NULL, style = NULL) { - - data <- dropNulls(list(open = open, close = close, style = style)) - session$sendInputMessage(id, data) - -} \ No newline at end of file diff --git a/R/bsCollapsePanel.R b/R/bsCollapsePanel.R new file mode 100644 index 0000000..5f5f16f --- /dev/null +++ b/R/bsCollapsePanel.R @@ -0,0 +1,42 @@ +#'bsCollapsePanel +#' +#'\code{bsCollapsePanel} creates individual panels within a \code{\link{bsCollapse}} object. +#' +#'@param title The title to display at the top of the panel. +#'@param \dots UI elements to include within the panel. +#'@param value \bold{Optional} The value to return when this panel is open. Defaults to \code{title}. +#'@param style \bold{Optional} A Bootstrap style to apply to the panel. (\code{primary}, \code{danger}, \code{warning}, \code{info}, or \code{success}) +#' +#'@templateVar item_name bsCollapsePanel +#'@templateVar family_name Collapses +#'@template item_details +#'@template footer +#'@export +bsCollapsePanel <- function(title, ..., value = title, style = NULL) { + + content <- list(...) + + id <- paste0("cpanel", sprintf("%07i", as.integer(stats::runif(1, 1, 1000000)))) + if(is.null(value)) { + value = title + } + if(is.null(style)) { + style = "default" + } + + bsTag <- shiny::tags$div(class = paste0("panel panel-", style), value = value, + shiny::tags$div(class = "panel-heading", role = "tab", id = paste0("heading_", id), + shiny::tags$h4(class = "panel-title", + shiny::tags$a("data-toggle" = "collapse", href = paste0("#", id), title) + ) + ), + shiny::tags$div(id = id, class = "panel-collapse collapse", role = "tabpanel", + shiny::tags$div(class = "panel-body", content) + ) + ) + + htmltools::attachDependencies(bsTag, shinyBSDep) + +} + + diff --git a/R/bsModal.R b/R/bsModal.R new file mode 100644 index 0000000..b2f9f4f --- /dev/null +++ b/R/bsModal.R @@ -0,0 +1,43 @@ +#'bsModal +#' +#'\code{bsModal} is used within the UI to create a modal window. +#' +#'@param id A unique identifier for the modal window +#'@param title The title to appear at the top of the modal +#'@param trigger The id of a button or link that will open the modal. +#'@param \dots UI elements to include within the modal +#'@param size \bold{Optional} What size should the modal be? (\code{small} or \code{large}) +#'@templateVar item_name bsModal +#'@templateVar family_name Modals +#'@template item_details +#'@template footer +#'@export +bsModal <- function(id, title, trigger, ..., size) { + if(!missing(size)) { + if(size == "large") { + size = "modal-lg" + } else if(size == "small") { + size = "modal-sm" + } + size <- paste("modal-dialog", size) + } else { + size <- "modal-dialog" + } + bsTag <- shiny::tags$div(class = "modal sbs-modal fade", id = id, tabindex = "-1", "data-sbs-trigger" = trigger, + shiny::tags$div(class = size, + shiny::tags$div(class = "modal-content", + shiny::tags$div(class = "modal-header", + shiny::tags$button(type = "button", class = "close", "data-dismiss" = "modal", shiny::tags$span(shiny::HTML("×"))), + shiny::tags$h4(class = "modal-title", title) + ), + shiny::tags$div(class = "modal-body", list(...)), + shiny::tags$div(class = "modal-footer", + shiny::tags$button(type = "button", class = "btn btn-default", "data-dismiss" = "modal", "Close") + ) + ) + ) + ) + + htmltools::attachDependencies(bsTag, shinyBSDep) + +} diff --git a/R/bsPopover.R b/R/bsPopover.R new file mode 100644 index 0000000..23b6a52 --- /dev/null +++ b/R/bsPopover.R @@ -0,0 +1,26 @@ +#'bsPopover +#' +#'\code{bsPopover} is used within the UI of an app to add a popover to a Shiny +#'input or output. +#' +#'@param id The id of the element to attach the popover to. +#'@param title The title of the popover. +#'@param content The main content of the popover. +#'@param placement Where the popover should appear relative to its target +#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}. +#'@param trigger What action should cause the popover to appear? (\code{hover}, +#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}. +#'@param options A named list of additional options to be set on the popover. +#' +#'@templateVar item_name bsPopover +#'@templateVar family_name Tooltips_and_Popovers +#'@template item_details +#'@template footer +#'@export +bsPopover <- function(id, title, content, placement="bottom", trigger="hover", options = NULL) { + + options = buildTooltipOrPopoverOptionsList(title, placement, trigger, options, content) + + createTooltipOrPopoverOnUI(id, "popover", options) + +} \ No newline at end of file diff --git a/R/bsTooltip.R b/R/bsTooltip.R new file mode 100644 index 0000000..1b97a73 --- /dev/null +++ b/R/bsTooltip.R @@ -0,0 +1,25 @@ +#'bsTooltip +#' +#'\code{bsTooltip} is used within the UI of an app to add a tooltip to a Shiny +#'input or output. +#' +#'@param id The id of the element to attach the tooltip to. +#'@param title The content of the tooltip. +#'@param placement Where the tooltip should appear relative to its target +#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}. +#'@param trigger What action should cause the tooltip to appear? (\code{hover}, +#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}. +#'@param options A named list of additional options to be set on the tooltip. +#' +#'@templateVar item_name bsTooltip +#'@templateVar family_name Tooltips_and_Popovers +#'@template item_details +#'@template footer +#'@export +bsTooltip <- function(id, title, placement="bottom", trigger="hover", options = NULL) { + + options = buildTooltipOrPopoverOptionsList(title, placement, trigger, options) + + createTooltipOrPopoverOnUI(id, "tooltip", options) + +} \ No newline at end of file diff --git a/R/closeAlert.R b/R/closeAlert.R new file mode 100644 index 0000000..06b041f --- /dev/null +++ b/R/closeAlert.R @@ -0,0 +1,17 @@ +#'closeAlert +#' +#'\code{closeAlert} is used within your Server logic to close an alert that you +#'created with \code{\link{createAlert}}. +#' +#'@inheritParams createAlert +#' +#'@templateVar item_name closeAlert +#'@templateVar family_name Alerts +#'@template item_details +#'@template footer +#'@export +closeAlert <- function(session, alertId) { + + session$sendCustomMessage(type="bsAlertClose", alertId) + +} \ No newline at end of file diff --git a/R/createAlert.R b/R/createAlert.R new file mode 100644 index 0000000..a07b1a7 --- /dev/null +++ b/R/createAlert.R @@ -0,0 +1,30 @@ +#'createAlert +#' +#'\code{createAlert} is used within the Server logic of your Shiny app to display +#'an alert to the user. +#' +#'@param session The session object passed to function given to shinyServer. +#'@param anchorId The unique identifier of the anchor where the alert should be +#'displayed. +#'@param alertId \bold{Optional} A unique identifier for the Alert. +#'@param title \bold{Optional} A title for the Alert. +#'@param content The main body of the Alert. HTML tags are allowed. +#'@param style A bootstrap style to apply. Defaults to \code{info}. +#'@param dismiss \bold{logical} Should the Alert be user dismissable? Defaults to \code{TRUE}. +#'@param append \code{logical} Should the Alert be appended below existing Alerts? Default to \code{TRUE}. +#' +#'@templateVar item_name createAlert +#'@templateVar family_name Alerts +#'@template item_details +#'@template footer +#'@export +createAlert <- function(session, anchorId, alertId = NULL, title=NULL, + content=NULL, style=NULL, dismiss=TRUE, append=TRUE) { + + data <- dropNulls(list(id = anchorId, alertId = alertId, title = title, + content = content, style = style, dismiss = dismiss, + append = append)) + + session$sendCustomMessage(type="bsAlertCreate", data) + +} diff --git a/R/misc.R b/R/misc.R index 46486c8..aa4dde3 100644 --- a/R/misc.R +++ b/R/misc.R @@ -7,18 +7,9 @@ shinyBSDep <- htmltools::htmlDependency("shinyBS", packageVersion("shinyBS"), src = c("href" = "sbs"), script = "shinyBS.js", stylesheet = "shinyBS.css") -# Wrapper to add the appropriate singletons to the head of the shiny app -sbsHead <- function(...) { - - tagList(singleton(tags$head(tags$script(src = "sbs/shinyBS.js"), - tags$link(rel = "stylesheet", type = "text/css", href = "sbs/shinyBS.css"))), - ... - ) -} - # Copy of dropNulls function for shiny to avoid using shiny:::dropNulls dropNulls <- function(x) { - x[!vapply(x, is.null, FUN.VALUE = logical(1))] + x[!vapply(x, is.null, FUN.VALUE = logical(1))] } # Takes a tag and removes any classes in the remove argument @@ -57,28 +48,3 @@ removeAttribs <- function(tag, ...) { getAttribs <- function(tag) { tag$attribs } - -inputCheck <- function(..., valid, stop.func = FALSE) { - - v <- list(...)[1] - - if(!(v %in% valid)) { - - n <- names(list(...))[1] - caller <- deparse(sys.call(-1)[1]) - msg <- paste0("Invalid '", n, "' argument in ", caller, ": ", v) - if(stop.func) { - stop(msg, call. = FALSE) - } else { - warning(msg, call. = FALSE) - } - - return(FALSE) - - } else { - - return(TRUE) - - } - -} diff --git a/R/removePopover.R b/R/removePopover.R new file mode 100644 index 0000000..c0a619c --- /dev/null +++ b/R/removePopover.R @@ -0,0 +1,18 @@ +#'removePopover +#' +#'\code{removePopover} is used within the Server logic of an app to remove an +#'existing popover from a Shiny input or output. +#' +#'@param session The session object passed to function given to shinyServer. +#'@param id The id of the element to remove the popover from. +#' +#'@templateVar item_name removePopover +#'@templateVar family_name Tooltips_and_Popovers +#'@template item_details +#'@template footer +#'@export +removePopover <- function(session, id) { + + session$sendCustomMessage(type="updateTooltip", list(action = "remove", type = "popover", id = id)) + +} \ No newline at end of file diff --git a/R/removeTooltip.R b/R/removeTooltip.R new file mode 100644 index 0000000..2dac958 --- /dev/null +++ b/R/removeTooltip.R @@ -0,0 +1,18 @@ +#'removeTooltip +#' +#'\code{removeTooltip} is used within the Server logic of an app to remove an +#'existing tooltip from a Shiny input or output. +#' +#'@param session The session object passed to function given to shinyServer. +#'@param id The id of the element to remove the tooltip from. +#' +#'@templateVar item_name removeTooltip +#'@templateVar family_name Tooltips_and_Popovers +#'@template item_details +#'@template footer +#'@export +removeTooltip <- function(session, id) { + + session$sendCustomMessage(type="updateTooltip", list(action = "remove", type = "tooltip", id = id)) + +} \ No newline at end of file diff --git a/R/shinyBS.R b/R/shinyBS.R index f928e6c..e69de29 100644 --- a/R/shinyBS.R +++ b/R/shinyBS.R @@ -1,14 +0,0 @@ -.onAttach <- function(...) { - - # Create link to javascript and css files for package - shiny::addResourcePath("sbs", system.file("www", package="shinyBS")) - -} - -# Create a dependency for shinyBS components -shinyBSDep <- htmltools::htmlDependency("shinyBS", packageVersion("shinyBS"), src = c("href" = "sbs"), script = "shinyBS.js", stylesheet = "shinyBS.css") - -# Copy of dropNulls function from shiny to avoid using shiny:::dropNulls -dropNulls <- function(x) { - x[!vapply(x, is.null, FUN.VALUE = logical(1))] -} diff --git a/R/toggleModal.R b/R/toggleModal.R new file mode 100644 index 0000000..3621535 --- /dev/null +++ b/R/toggleModal.R @@ -0,0 +1,19 @@ +#'toggleModal +#' +#'\code{toggleModal} is used within your Server logic to open or close a modal +#'window. +#' +#'@param session The session object passed to function given to shinyServer. +#'@param modalId The id of the modal window you want to open/close +#'@param toggle Should the modal window \code{open}, \code{close}, or \code{toggle}? +#' +#'@templateVar item_name toggleModal +#'@templateVar family_name Modals +#'@template item_details +#'@template footer +#'@export +toggleModal <- function(session, modalId, toggle = "toggle") { + + session$sendInputMessage(modalId, list(toggle = toggle)) + +} \ No newline at end of file diff --git a/R/updateCollapse.R b/R/updateCollapse.R new file mode 100644 index 0000000..000dff2 --- /dev/null +++ b/R/updateCollapse.R @@ -0,0 +1,27 @@ +#'updateCollapse +#' +#'\code{updateCollapse} is used within the Server logic of your Shiny app to +#'modify a Collapse after load. +#' +#'@param session The session object passed to function given to shinyServer. +#'@param id The id of the Collapse object you want to change. +#'@param open A vector of \code{value} (or \code{title} if no \code{value} was +#'provided) values identifying the panels you want to open. +#'@param close A vector of \code{value} (or \code{title} if no \code{value} was +#'provided) values identifying the panels you want to close. +#'@param style A named list of Bootstrap styles (\code{primary}, \code{danger}, \code{info}, +#'\code{warning}, \code{success}, or \code{default}). The names should correspond +#'to the \code{value} (or \code{title} if no \code{value} was provided) of the +#'\code{\link{bsCollapsePanel}} you want to change. +#' +#'@templateVar item_name updateCollapse +#'@templateVar family_name Collapses +#'@template item_details +#'@template footer +#'@export +updateCollapse <- function(session, id, open = NULL, close = NULL, style = NULL) { + + data <- dropNulls(list(open = open, close = close, style = style)) + session$sendInputMessage(id, data) + +} \ No newline at end of file diff --git a/inst/bsDemo/server.R b/inst/bsDemo/server.R deleted file mode 100644 index 30e4c31..0000000 --- a/inst/bsDemo/server.R +++ /dev/null @@ -1,46 +0,0 @@ -library(shiny) -library(shinyBS) - -shinyServer(function(input, output, session) { - - Alerts <- observeEvent(input$bsAlertCreate, { - - ui <- "bsAlert(anchorId = 'bsAlertDemo')" - session$sendCustomMessage('displayCode', list(id = "Alerts_ui", content = ui)) - - svr <- "createAlert(session, anchorId = 'bsAlertDemo'" - if(input$bsAlertTitle != "") svr <- paste0(svr, ", title = '", input$bsAlertTitle, "'") - if(input$bsAlertContent != "") svr <- paste0(svr, ", content = '", input$bsAlertContent, "'") - svr <- paste0(svr, ", style = '", input$bsAlertStyle, "'") - if(input$bsAlertDismiss == FALSE) svr <- paste0(svr, ", dismiss = FALSE") - if(input$bsAlertAppend == FALSE) svr <- paste0(svr, ", append = FALSE") - svr <- paste0(svr, ")") - - session$sendCustomMessage("displayCode", list(id = "Alerts_server", content = svr)) - - eval(parse(text = svr)) - - }) - - Collapses <- observe({ - - ui <- ' -bsCollapse(id = "collapseExample", multiple = TRUE, open = c("Text", "Shiny Outputs"), - bsCollapsePanel("Text", - HTML("You may want more explanation or instructions for your Shiny app than is reasonable to display at all times. Wrap this text in absCollapse and the user can hide it when they are done with it and easily bring it back if they need to reference it again.")
- ),
- bsCollapsePanel("Shiny Outputs",
- tagList(tags$span("You can embed Shiny outputs into your collapses."),
- plotOutput("collapsePlot"))
- )
-)
-'
- session$sendCustomMessage('displayCode', list(id = "Collapses_ui", content = ui))
-
- })
-
- output$collapsePlot <- renderPlot({
- plot(rnorm(100))
- })
-
-})
\ No newline at end of file
diff --git a/inst/bsDemo/ui.R b/inst/bsDemo/ui.R
deleted file mode 100644
index ba09ff4..0000000
--- a/inst/bsDemo/ui.R
+++ /dev/null
@@ -1,80 +0,0 @@
-library(shiny)
-library(shinyBS)
-
-demoPanel <- function(title, intro, controls, example) {
- tabPanel(title,
- fluidRow(style = 'padding-top: 10px;',
- column(8,
- fluidRow(
- column(12, class = "intro",
- bsCollapse(id = paste(gsub(" ", "_", title, fixed = TRUE), "intro", sep = "_"), open = "Introduction",
- bsCollapsePanel("Introduction", HTML(intro))
- )
- )
- ),
- fluidRow(
- column(4,
- bsCollapse(id = paste(gsub(" ", "_", title, fixed = TRUE), "controls", sep = "_"), open = "Controls",
- bsCollapsePanel("Controls", controls)
- )
- ),
- column(8,
- bsCollapse(id = paste(gsub(" ", "_", title, fixed = TRUE), "example", sep = "_"), open = "Example",
- bsCollapsePanel("Example", example)
- )
- )
- )
- ),
- column(4,
- fluidRow(
- column(12,
- bsCollapse(id = paste(gsub(" ", "_", title, fixed = TRUE), "code", sep = "_"), open = c("UI", "Server"), multiple = TRUE,
- bsCollapsePanel("UI", tags$pre(id = paste(gsub(" ", "_", title, fixed = TRUE), "ui", sep = "_"), class = "r code shiny-text-output", "")),
- bsCollapsePanel("Server", tags$pre(tags$div(id = paste(gsub(" ", "_", title, fixed = TRUE), "server", sep = "_"), class = "r code shiny-text-output", "")))
- )
- )
- )
- )
- )
- )
-}
-
-fluidPage(style = "padding-top: 20px;",
- tags$head(
- tags$link(rel = "stylesheet", href = "styles/xcode.css"),
- tags$link(rel = "stylesheet", href = "demo.css"),
- tags$script(src = "highlight.pack.js"),
- tags$script(src = "demo.js"),
- tags$title("shinyBS Demo")
- ),
- tabsetPanel(id = "bsDemo", position = "left",
- demoPanel("Alerts",
- intro = "Alerts allow you to communicate information to the user on the fly. Begin by creating an alert anchor with the bsAlert() function in the iu.R script. You can then add alerts to this anchor with createAlert() and remove them with closeAlert().
By default, new alerts are placed below any alerts already present in the alert anchor but if you set append = FALSE in createAlert() the new alert will overwrite any existing alerts.
Also by default, alerts will be dismissable by the user with a small × in the upper-right corner of the alert. You can override this behavior by setting dismiss = FALSE in createAlert(). The alert can then only be removed using closeAlert() (be sure to set alertId when you create the alert) or by creating a new alert with append = FALSE in the same anchor.
Collapses are a way to reduce clutter in your Shiny app by allowing users to decide which elements they want visible at any given time. This demo makes extensive use of collapses. Each section is wrapped in a collapse element so that it can be hidden or shown with a click.
", - controls = tagList(checkboxInput("bsCollapseMultiple", "Multiple", value = TRUE), - selectInput("bsCollapseTextStyle", "'Text' Style", choices = c("default", "warning", "danger", "info", "success"), selected = "default"), - selectInput("bsCollapseOutputStyle", "'Shiny Outputs' Style", choices = c("default", "warning", "danger", "info", "success"), selected = "default")), - example = bsCollapse(id = "collapseExample", multiple = TRUE, open = c("Text", "Shiny Outputs"), - bsCollapsePanel("Text", HTML("You may want more explanation or instructions for your Shiny app than is reasonable to display at all times. Wrap this text in absCollapse and the user can hide it when they are done with it and easily bring it back if they need to reference it again.")),
- bsCollapsePanel("Shiny Outputs", tagList(tags$span("You can embed Shiny outputs into your collapses."), plotOutput("collapsePlot")))
- )
- ),
- tabPanel("Tab 2",
- fluidRow(
- column(12,
- "This is the end."
- )
- )
- )
- )
-)
\ No newline at end of file
diff --git a/inst/bsDemo/www/CHANGES.md b/inst/bsDemo/www/CHANGES.md
deleted file mode 100644
index c20ef62..0000000
--- a/inst/bsDemo/www/CHANGES.md
+++ /dev/null
@@ -1,1049 +0,0 @@
-## Version 8.4
-
-We've got the new [demo page][]! The obvious new feature is the new look, but
-apart from that it's got smarter: by presenting languages in groups it avoids
-running 10000 highlighting attempts after first load which was slowing it down
-and giving bad overall impression. It is now also being generated from test
-code snippets so the authors of new languages don't have to update both tests
-and the demo page with the same thing.
-
-Other notable changes:
-
-- The `template_comment` class is gone in favor of the more general `comment`.
-- Number parsing unified and improved across languages.
-- C++, Java and C# now use unified grammar to highlight titles in
- function/method definitions.
-- The browser build is now usable as an AMD module, there's no separate build
- target for that anymore.
-- OCaml has got a [comprehensive overhaul][ocaml] by [Mickaël Delahaye][].
-- Clojure's data structures and literals are now highlighted outside of lists
- and we can now highlight Clojure's REPL sessions.
-
-New languages:
-
-- *AspectJ* by [Hakan Özler][]
-- *STEP Part 21* by [Adam Joseph Cook][]
-- *SML* derived by [Edwin Dalorzo][] from OCaml definition
-- *Mercury* by [mucaho][]
-- *Smali* by [Dennis Titze][]
-- *Verilog* by [Jon Evans][]
-- *Stata* by [Brian Quistorff][]
-
-[Hakan Özler]: https://github.com/ozlerhakan
-[Adam Joseph Cook]: https://github.com/adamjcook
-[demo page]: https://highlightjs.org/static/demo/
-[Ivan Sagalaev]: https://github.com/isagalaev
-[Edwin Dalorzo]: https://github.com/edalorzo
-[mucaho]: https://github.com/mucaho
-[Dennis Titze]: https://github.com/titze
-[Jon Evans]: https://github.com/craftyjon
-[Brian Quistorff]: https://github.com/bquistorff
-[ocaml]: https://github.com/isagalaev/highlight.js/pull/608#issue-46190207
-[Mickaël Delahaye]: https://github.com/polazarus
-
-
-## Version 8.3
-
-We streamlined our tool chain, it is now based entirely on node.js instead of
-being a mix of node.js, Python and Java. The build script options and arguments
-remained the same, and we've noted all the changes in the [documentation][b].
-Apart from reducing complexity, the new build script is also faster from not
-having to start Java machine repeatedly. The credits for the work go to [Jeremy
-Hull][].
-
-Some notable fixes:
-
-- PHP and JavaScript mixed in HTML now live happily with each other.
-- JavaScript regexes now understand ES6 flags "u" and "y".
-- `throw` keyword is no longer detected as a method name in Java.
-- Fixed parsing of numbers and symbols in Clojure thanks to [input from Ivan
- Kleshnin][ik].
-
-New languages in this release:
-
-- *Less* by [Max Mikhailov][]
-- *Stylus* by [Bryant Williams][]
-- *Tcl* by [Radek Liska][]
-- *Puppet* by [Jose Molina Colmenero][]
-- *Processing* by [Erik Paluka][]
-- *Twig* templates by [Luke Holder][]
-- *PowerShell* by [David Mohundro][], based on [the work of Nicholas
- Blumhardt][ps]
-- *XL* by [Christophe de Dinechin][]
-- *LiveScript* by [Taneli Vatanen][] and [Jen Evers-Corvina][]
-- *ERB* (Ruby in HTML) by [Lucas Mazza][]
-- *Roboconf* by [Vincent Zurczak][]
-
-[b]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
-[Jeremy Hull]: https://github.com/sourrust
-[ik]: https://twitter.com/IvanKleshnin/status/514041599484231680
-[Max Mikhailov]: https://github.com/seven-phases-max
-[Bryant Williams]: https://github.com/scien
-[Radek Liska]: https://github.com/Nindaleth
-[Jose Molina Colmenero]: https://github.com/Moliholy
-[Erik Paluka]: https://github.com/paluka
-[Luke Holder]: https://github.com/lukeholder
-[David Mohundro]: https://github.com/drmohundro
-[ps]: https://github.com/OctopusDeploy/Library/blob/master/app/shared/presentation/highlighting/powershell.js
-[Christophe de Dinechin]: https://github.com/c3d
-[Taneli Vatanen]: https://github.com/Daiz-
-[Jen Evers-Corvina]: https://github.com/sevvie
-[Lucas Mazza]: https://github.com/lucasmazza
-[Vincent Zurczak]: https://github.com/vincent-zurczak
-
-## Version 8.2
-
-We've finally got [real tests][test] and [continuous testing on Travis][ci]
-thanks to [Jeremy Hull][] and [Chris Eidhof][]. The tests designed to cover
-everything: language detection, correct parsing of individual language features
-and various special cases. This is a very important change that gives us
-confidence in extending language definitions and refactoring library core.
-
-We're going to redesign the old [demo/test suite][demo] into an interactive
-demo web app. If you're confident front-end developer or designer and want to
-help us with it, drop a comment into [the issue][#542] on GitHub.
-
-[test]: https://github.com/isagalaev/highlight.js/tree/master/test
-[demo]: https://highlightjs.org/static/test.html
-[#542]: https://github.com/isagalaev/highlight.js/issues/542
-[ci]: https://travis-ci.org/isagalaev/highlight.js
-[Jeremy Hull]: https://github.com/sourrust
-[Chris Eidhof]: https://github.com/chriseidhof
-
-As usually there's a handful of new languages in this release:
-
-- *Groovy* by [Guillaume Laforge][]
-- *Dart* by [Maxim Dikun][]
-- *Dust* by [Michael Allen][]
-- *Scheme* by [JP Verkamp][]
-- *G-Code* by [Adam Joseph Cook][]
-- *Q* from Kx Systems by [Sergey Vidyuk][]
-
-[Guillaume Laforge]: https://github.com/glaforge
-[Maxim Dikun]: https://github.com/dikmax
-[Michael Allen]: https://github.com/bfui
-[JP Verkamp]: https://github.com/jpverkamp
-[Adam Joseph Cook]: https://github.com/adamjcook
-[Sergey Vidyuk]: https://github.com/sv
-
-Other improvements:
-
-- [Erik Osheim][] heavily reworked Scala definitions making it richer.
-- [Lucas Mazza][] fixed Ruby hashes highlighting
-- Lisp variants (Lisp, Clojure and Scheme) are unified in regard to naming
- the first symbol in parentheses: it's "keyword" in general case and also
- "built_in" for built-in functions in Clojure and Scheme.
-
-[Erik Osheim]: https://github.com/non
-[Lucas Mazza]: https://github.com/lucasmazza
-
-## Version 8.1
-
-New languages:
-
-- *Gherkin* by [Sam Pikesley][]
-- *Elixir* by [Josh Adams][]
-- *NSIS* by [Jan T. Sott][]
-- *VIM script* by [Jun Yang][]
-- *Protocol Buffers* by [Dan Tao][]
-- *Nix* by [Domen Kožar][]
-- *x86asm* by [innocenat][]
-- *Cap’n Proto* and *Thrift* by [Oleg Efimov][]
-- *Monkey* by [Arthur Bikmullin][]
-- *TypeScript* by [Panu Horsmalahti][]
-- *Nimrod* by [Flaviu Tamas][]
-- *Gradle* by [Damian Mee][]
-- *Haxe* by [Christopher Kaster][]
-- *Swift* by [Chris Eidhof][] and [Nate Cook][]
-
-New styles:
-
-- *Kimbie*, light and dark variants by [Jan T. Sott][]
-- *Color brewer* by [Fabrício Tavares de Oliveira][]
-- *Codepen.io embed* by [Justin Perry][]
-- *Hybrid* by [Nic West][]
-
-[Sam Pikesley]: https://github.com/pikesley
-[Sindre Sorhus]: https://github.com/sindresorhus
-[Josh Adams]: https://github.com/knewter
-[Jan T. Sott]: https://github.com/idleberg
-[Jun Yang]: https://github.com/harttle
-[Dan Tao]: https://github.com/dtao
-[Domen Kožar]: https://github.com/iElectric
-[innocenat]: https://github.com/innocenat
-[Oleg Efimov]: https://github.com/Sannis
-[Arthur Bikmullin]: https://github.com/devolonter
-[Panu Horsmalahti]: https://github.com/panuhorsmalahti
-[Flaviu Tamas]: https://github.com/flaviut
-[Damian Mee]: https://github.com/chester1000
-[Christopher Kaster]: http://christopher.kaster.ws
-[Fabrício Tavares de Oliveira]: https://github.com/fabriciotav
-[Justin Perry]: https://github.com/ourmaninamsterdam
-[Nic West]: https://github.com/nicwest
-[Chris Eidhof]: https://github.com/chriseidhof
-[Nate Cook]: https://github.com/natecook1000
-
-Other improvements:
-
-- The README is heavily reworked and brought up to date by [Jeremy Hull][].
-- Added [`listLanguages()`][ll] method in the API.
-- Improved C/C++/C# detection.
-- Added a bunch of new language aliases, documented the existing ones. Thanks to
- [Sindre Sorhus][] for background research.
-- Added phrasal English words to boost relevance in comments.
-- Many improvements to SQL definition made by [Heiko August][],
- [Nikolay Lisienko][] and [Travis Odom][].
-- The shorter `lang-` prefix for language names in HTML classes supported
- alongside `language-`. Thanks to [Jeff Escalante][].
-- Ruby's got support for interactive console sessions. Thanks to
- [Pascal Hurni][].
-- Added built-in functions for R language. Thanks to [Artem A. Klevtsov][].
-- Rust's got definition for lifetime parameters and improved string syntax.
- Thanks to [Roman Shmatov][].
-- Various improvements to Objective-C definition by [Matt Diephouse][].
-- Fixed highlighting of generics in Java.
-
-[ll]: http://highlightjs.readthedocs.org/en/latest/api.html#listlanguages
-[Sindre Sorhus]: https://github.com/sindresorhus
-[Heiko August]: https://github.com/auge8472
-[Nikolay Lisienko]: https://github.com/neor-ru
-[Travis Odom]: https://github.com/Burstaholic
-[Jeff Escalante]: https://github.com/jenius
-[Pascal Hurni]: https://github.com/phurni
-[Jiyin Yiyong]: https://github.com/jiyinyiyong
-[Artem A. Klevtsov]: https://github.com/unikum
-[Roman Shmatov]: https://github.com/shmatov
-[Jeremy Hull]: https://github.com/sourrust
-[Matt Diephouse]: https://github.com/mdiep
-
-
-## Version 8.0
-
-This new major release is quite a big overhaul bringing both new features and
-some backwards incompatible changes. However, chances are that the majority of
-users won't be affected by the latter: the basic scenario described in the
-README is left intact.
-
-Here's what did change in an incompatible way:
-
-- We're now prefixing all classes located in [CSS classes reference][cr] with
- `hljs-`, by default, because some class names would collide with other
- people's stylesheets. If you were using an older version, you might still want
- the previous behavior, but still want to upgrade. To suppress this new
- behavior, you would initialize like so:
-
- ```html
-
- ```
-
-- `tabReplace` and `useBR` that were used in different places are also unified
- into the global options object and are to be set using `configure(options)`.
- This function is documented in our [API docs][]. Also note that these
- parameters are gone from `highlightBlock` and `fixMarkup` which are now also
- rely on `configure`.
-
-- We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
- was used to register languages with the library in favor of two new methods:
- `registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
-
-- Result returned from `highlight` and `highlightAuto` no longer contains two
- separate attributes contributing to relevance score, `relevance` and
- `keyword_count`. They are now unified in `relevance`.
-
-Another technically compatible change that nonetheless might need attention:
-
-- The structure of the NPM package was refactored, so if you had installed it
- locally, you'll have to update your paths. The usual `require('highlight.js')`
- works as before. This is contributed by [Dmitry Smolin][].
-
-New features:
-
-- Languages now can be recognized by multiple names like "js" for JavaScript or
- "html" for, well, HTML (which earlier insisted on calling it "xml"). These
- aliases can be specified in the class attribute of the code container in your
- HTML as well as in various API calls. For now there are only a few very common
- aliases but we'll expand it in the future. All of them are listed in the
- [class reference][cr].
-
-- Language detection can now be restricted to a subset of languages relevant in
- a given context — a web page or even a single highlighting call. This is
- especially useful for node.js build that includes all the known languages.
- Another example is a StackOverflow-style site where users specify languages
- as tags rather than in the markdown-formatted code snippets. This is
- documented in the [API reference][] (see methods `highlightAuto` and
- `configure`).
-
-- Language definition syntax streamlined with [variants][] and
- [beginKeywords][].
-
-New languages and styles:
-
-- *Oxygene* by [Carlo Kok][]
-- *Mathematica* by [Daniel Kvasnička][]
-- *Autohotkey* by [Seongwon Lee][]
-- *Atelier* family of styles in 10 variants by [Bram de Haan][]
-- *Paraíso* styles by [Jan T. Sott][]
-
-Miscellaneous improvements:
-
-- Highlighting `=>` prompts in Clojure.
-- [Jeremy Hull][] fixed a lot of styles for consistency.
-- Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
-- Objective C and C# now properly highlight titles in method definition.
-- Big overhaul of relevance counting for a number of languages. Please do report
- bugs about mis-detection of non-trivial code snippets!
-
-[API reference]: http://highlightjs.readthedocs.org/en/latest/api.html
-
-[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
-[api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
-[variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
-[beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
-[php-html]: https://twitter.com/highlightjs/status/408890903017689088
-
-[Carlo Kok]: https://github.com/carlokok
-[Bram de Haan]: https://github.com/atelierbram
-[Daniel Kvasnička]: https://github.com/dkvasnicka
-[Dmitry Smolin]: https://github.com/dimsmol
-[Jeremy Hull]: https://github.com/sourrust
-[Seongwon Lee]: https://github.com/dlimpid
-[Jan T. Sott]: https://github.com/idleberg
-
-
-## Version 7.5
-
-A catch-up release dealing with some of the accumulated contributions. This one
-is probably will be the last before the 8.0 which will be slightly backwards
-incompatible regarding some advanced use-cases.
-
-One outstanding change in this version is the addition of 6 languages to the
-[hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
-Makefile. It now weighs about 6K more but we're going to keep it under 30K.
-
-New languages:
-
-- OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
-- [LiveCode Server][lcs] by [Ralf Bitter][revig]
-- Scilab by [Sylvestre Ledru][sylvestre]
-- basic support for Makefile by [Ivan Sagalaev][isagalaev]
-
-Improvements:
-
-- Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
- regexps.
-- Clojure now allows a function call in the beginning of s-expressions
- `(($filter "myCount") (arr 1 2 3 4 5))`.
-- Haskell's got new keywords and now recognizes more things like pragmas,
- preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
- for the implementation and to [Jeremy Hull][sourrust] for guiding it.
-- Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
-
-[mehdid]: https://github.com/mehdid
-[nbraud]: https://github.com/nbraud
-[revig]: https://github.com/revig
-[lcs]: http://livecode.com/developers/guides/server/
-[sylvestre]: https://github.com/sylvestre
-[isagalaev]: https://github.com/isagalaev
-[treep]: https://github.com/treep
-[sourrust]: https://github.com/sourrust
-[d]: http://highlightjs.org/download/
-
-
-## New core developers
-
-The latest long period of almost complete inactivity in the project coincided
-with growing interest to it led to a decision that now seems completely obvious:
-we need more core developers.
-
-So without further ado let me welcome to the core team two long-time
-contributors: [Jeremy Hull][] and [Oleg
-Efimov][].
-
-Hope now we'll be able to work through stuff faster!
-
-P.S. The historical commit is [here][1] for the record.
-
-[Jeremy Hull]: https://github.com/sourrust
-[Oleg Efimov]: https://github.com/sannis
-[1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
-
-
-## Version 7.4
-
-This long overdue version is a snapshot of the current source tree with all the
-changes that happened during the past year. Sorry for taking so long!
-
-Along with the changes in code highlight.js has finally got its new home at
-` tags are not being overridden anymore
-- More correct highlighting of code blocks inside non-`` containers:
- highlighter now doesn't insist on replacing them with its own container and
- just replaces the contents.
-- Small fixes in browser compatibility and heuristics.
-
-[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
-[html 5]: http://en.wikipedia.org/wiki/HTML5
-[ik]: http://kalnitsky.org.ua/
-
-### For developers
-
-The most significant change is the ability to include language submodes right
-under `contains` instead of defining explicit named submodes in the main array:
-
- contains: [
- 'string',
- 'number',
- {begin: '\\n', end: hljs.IMMEDIATE_RE}
- ]
-
-This is useful for auxiliary modes needed only in one place to define parsing.
-Note that such modes often don't have `className` and hence won't generate a
-separate `` in the resulting markup. This is similar in effect to
-`noMarkup: true`. All existing languages have been refactored accordingly.
-
-Test file test.html has at last become a real test. Now it not only puts the
-detected language name under the code snippet but also tests if it matches the
-expected one. Test summary is displayed right above all language snippets.
-
-
-## CDN
-
-Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
-[Link up][l]!
-
-[yandex]: http://yandex.com/
-[l]: http://softwaremaniacs.org/soft/highlight/en/download/
-
-
-## Version 5.10 — "Paris".
-
-Though I'm on a vacation in Paris, I decided to release a new version with a
-couple of small fixes:
-
-- Tomas Vitvar discovered that TAB replacement doesn't always work when used
- with custom markup in code
-- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
-
-
-## Version 5.9
-
-A long-awaited version is finally released.
-
-New languages:
-
-- Andrew Fedorov made a definition for Lua
-- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
- Nginx config
-- [Vladimir Moskva][vm] made a definition for TeX
-
-[pl]: http://kung-fu-tzu.ru/
-[vm]: http://fulc.ru/
-
-Fixes for existing languages:
-
-- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
- [YARD][] inline documentation
-- the definition of SQL has become more solid and now it shouldn't be overly
- greedy when it comes to language detection
-
-[ls]: http://gnuu.org/
-[yard]: http://yardoc.org/
-
-The highlighter has become more usable as a library allowing to do highlighting
-from initialization code of JS frameworks and in ajax methods (see.
-readme.eng.txt).
-
-Also this version drops support for the [WordPress][wp] plugin. Everyone is
-welcome to [pick up its maintenance][p] if needed.
-
-[wp]: http://wordpress.org/
-[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
-
-
-## Version 5.8
-
-- Jan Berkel has contributed a definition for Scala. +1 to hotness!
-- All CSS-styles are rewritten to work only inside `` tags to avoid
- conflicts with host site styles.
-
-
-## Version 5.7.
-
-Fixed escaping of quotes in VBScript strings.
-
-
-## Version 5.5
-
-This version brings a small change: now .ini-files allow digits, underscores and
-square brackets in key names.
-
-
-## Version 5.4
-
-Fixed small but upsetting bug in the packer which caused incorrect highlighting
-of explicitly specified languages. Thanks to Andrew Fedorov for precise
-diagnostics!
-
-
-## Version 5.3
-
-The version to fulfil old promises.
-
-The most significant change is that highlight.js now preserves custom user
-markup in code along with its own highlighting markup. This means that now it's
-possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
-[initial proposal][1] and for making a proof-of-concept patch.
-
-Also in this version:
-
-- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
- support for CSS @-rules and Ruby symbols.
-- Yura Zaripov has sent two styles: Brown Paper and School Book.
-- Oleg Volchkov has sent a definition for [Parser 3][p3].
-
-[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
-[p3]: http://www.parser.ru/
-[vp]: http://vasily.polovnyov.ru/
-[vd]: http://dolzhenko.blogspot.com/
-
-
-## Version 5.2
-
-- at last it's possible to replace indentation TABs with something sensible
- (e.g. 2 or 4 spaces)
-- new keywords and built-ins for 1C by Sergey Baranov
-- a couple of small fixes to Apache highlighting
-
-
-## Version 5.1
-
-This is one of those nice version consisting entirely of new and shiny
-contributions!
-
-- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
-- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
- original visual style for it is now available for all highlight.js languages
- under the name "Magula".
-- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
- languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
- the matter.
-
-[vooon]: http://vehq.ru/about/
-[rukeba]: http://rukeba.com/
-[drake]: http://drakeguan.org/
-[ke]: http://k-evdokimenko.moikrug.ru/
-
-
-## Version 5.0
-
-The main change in the new major version of highlight.js is a mechanism for
-packing several languages along with the library itself into a single compressed
-file. Now sites using several languages will load considerably faster because
-the library won't dynamically include additional files while loading.
-
-Also this version fixes a long-standing bug with Javascript highlighting that
-couldn't distinguish between regular expressions and division operations.
-
-And as usually there were a couple of minor correctness fixes.
-
-Great thanks to all contributors! Keep using highlight.js.
-
-
-## Version 4.3
-
-This version comes with two contributions from [Jason Diamond][jd]:
-
-- language definition for C# (yes! it was a long-missed thing!)
-- Visual Studio-like highlighting style
-
-Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
-
-[jd]: http://jason.diamond.name/weblog/
-
-
-## Version 4.2
-
-The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
-somewhat experimental meaning that for highlighting "keywords" it doesn't use
-any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
-in parentheses wherever it makes sense. I'd like to ask people programming in
-Lisp to confirm if it's a good idea and send feedback to [the forum][f].
-
-Other changes:
-
-- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
-- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
- test.html
-- comments now allowed inside Ruby function definition
-- [MEL][] language from [Shuen-Huei Guan][drake]
-- whitespace now allowed between `` and ``
-- better auto-detection of C++ and PHP
-- HTML allows embedded VBScript (`<% .. %>`)
-
-[f]: http://softwaremaniacs.org/forum/highlightjs/
-[voldmar]: http://voldmar.ya.ru/
-[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
-[drake]: http://drakeguan.org/
-
-
-## Version 4.1
-
-Languages:
-
-- Bash from Vah
-- DOS bat-files from Alexander Makarov (Sam)
-- Diff files from Vasily Polovnyov
-- Ini files from myself though initial idea was from Sam
-
-Styles:
-
-- Zenburn from Vladimir Epifanov, this is an imitation of a
- [well-known theme for Vim][zenburn].
-- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
- just one color in only three gradations :-)
-
-In other news. [One small bug][bug] was fixed, built-in keywords were added for
-Python and C++ which improved auto-detection for the latter (it was shame that
-[my wife's blog][alenacpp] had issues with it from time to time). And lastly
-thanks go to Sam for getting rid of my stylistic comments in code that were
-getting in the way of [JSMin][].
-
-[zenburn]: http://en.wikipedia.org/wiki/Zenburn
-[alenacpp]: http://alenacpp.blogspot.com/
-[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
-[jsmin]: http://code.google.com/p/jsmin-php/
-
-
-## Version 4.0
-
-New major version is a result of vast refactoring and of many contributions.
-
-Visible new features:
-
-- Highlighting of embedded languages. Currently is implemented highlighting of
- Javascript and CSS inside HTML.
-- Bundled 5 ready-made style themes!
-
-Invisible new features:
-
-- Highlight.js no longer pollutes global namespace. Only one object and one
- function for backward compatibility.
-- Performance is further increased by about 15%.
-
-Changing of a major version number caused by a new format of language definition
-files. If you use some third-party language files they should be updated.
-
-
-## Version 3.5
-
-A very nice version in my opinion fixing a number of small bugs and slightly
-increased speed in a couple of corner cases. Thanks to everybody who reports
-bugs in he [forum][f] and by email!
-
-There is also a new language — XML. A custom XML formerly was detected as HTML
-and didn't highlight custom tags. In this version I tried to make custom XML to
-be detected and highlighted by its own rules. Which by the way include such
-things as CDATA sections and processing instructions (` ... ?>`).
-
-[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
-
-
-## Version 3.3
-
-[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
-File export.html contains a little program that shows and allows to copy and
-paste an HTML code generated by the highlighter for any code snippet. This can
-be useful in situations when one can't use the script itself on a site.
-
-
-[xonix]: http://xonixx.blogspot.com/
-
-
-## Version 3.2 consists completely of contributions:
-
-- Vladimir Gubarkov has described SmallTalk
-- Yuri Ivanov has described 1C
-- Peter Leonov has packaged the highlighter as a Firefox extension
-- Vladimir Ermakov has compiled a mod for phpBB
-
-Many thanks to you all!
-
-
-## Version 3.1
-
-Three new languages are available: Django templates, SQL and Axapta. The latter
-two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
-SQL definition but I'd never started it be it from the ground up :-)
-
-The engine itself has got a long awaited feature of grouping keywords
-("keyword", "built-in function", "literal"). No more hacks!
-
-[1]: http://roudakov.ru/
-
-
-## Version 3.0
-
-It is major mainly because now highlight.js has grown large and has become
-modular. Now when you pass it a list of languages to highlight it will
-dynamically load into a browser only those languages.
-
-Also:
-
-- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
- RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
- languages!
-- Heuristics for C++ and HTML got better.
-- I've implemented (at last) a correct handling of backslash escapes in C-like
- languages.
-
-There is also a small backwards incompatible change in the new version. The
-function initHighlighting that was used to initialize highlighting instead of
-initHighlightingOnLoad a long time ago no longer works. If you by chance still
-use it — replace it with the new one.
-
-[RibKit]: http://ribkit.sourceforge.net/
-
-
-## Version 2.9
-
-Highlight.js is a parser, not just a couple of regular expressions. That said
-I'm glad to announce that in the new version 2.9 has support for:
-
-- in-string substitutions for Ruby -- `#{...}`
-- strings from from numeric symbol codes (like #XX) for Delphi
-
-
-## Version 2.8
-
-A maintenance release with more tuned heuristics. Fully backwards compatible.
-
-
-## Version 2.7
-
-- Nikita Ledyaev presents highlighting for VBScript, yay!
-- A couple of bugs with escaping in strings were fixed thanks to Mickle
-- Ongoing tuning of heuristics
-
-Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
-
-
-## Version 2.4
-
-- Peter Leonov provides another improved highlighting for Perl
-- Javascript gets a new kind of keywords — "literals". These are the words
- "true", "false" and "null"
-
-Also highlight.js homepage now lists sites that use the library. Feel free to
-add your site by [dropping me a message][mail] until I find the time to build a
-submit form.
-
-[mail]: mailto:Maniac@SoftwareManiacs.Org
-
-
-## Version 2.3
-
-This version fixes IE breakage in previous version. My apologies to all who have
-already downloaded that one!
-
-
-## Version 2.2
-
-- added highlighting for Javascript
-- at last fixed parsing of Delphi's escaped apostrophes in strings
-- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
- Perl
-
-
-## Version 2.0
-
-- Ruby support by [Anton Kovalyov][ak]
-- speed increased by orders of magnitude due to new way of parsing
-- this same way allows now correct highlighting of keywords in some tricky
- places (like keyword "End" at the end of Delphi classes)
-
-[ak]: http://anton.kovalyov.net/
-
-
-## Version 1.0
-
-Version 1.0 of javascript syntax highlighter is released!
-
-It's the first version available with English description. Feel free to post
-your comments and question to [highlight.js forum][forum]. And don't be afraid
-if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
-
-[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
diff --git a/inst/bsDemo/www/LICENSE b/inst/bsDemo/www/LICENSE
deleted file mode 100644
index 422deb7..0000000
--- a/inst/bsDemo/www/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright (c) 2006, Ivan Sagalaev
-All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of highlight.js nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/inst/bsDemo/www/README.md b/inst/bsDemo/www/README.md
deleted file mode 100644
index 8618022..0000000
--- a/inst/bsDemo/www/README.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# Highlight.js
-
-[](https://travis-ci.org/isagalaev/highlight.js)
-
-Highlight.js is a syntax highlighter written in JavaScript. It works in the
-browser as well as on the server. It works with pretty much any markup,
-doesn't depend on any framework and has automatic language detection.
-
-
-## Getting Started
-
-The bare minimum for using highlight.js on a web page is linking to the library
-along with one of the styles and calling [`initHighlightingOnLoad`][1]:
-
-```html
-
-
-
-```
-
-This will find and highlight code inside of `` tags trying to detect
-the language automatically. If automatic detection doesn't work for you, you can
-specify the language in the class attribute:
-
-```html
-...
-```
-
-The list of supported language classes is available in the [class reference][8].
-Classes can also be prefixed with either `language-` or `lang-`.
-
-To disable highlighting altogether use the `nohighlight` class:
-
-```html
-...
-```
-
-## Custom Initialization
-
-When you need a bit more control over the initialization of
-highlight.js, you can use the [`highlightBlock`][2] and [`configure`][3]
-functions. This allows you to control *what* to highlight and *when*.
-
-Here's an equivalent way to calling [`initHighlightingOnLoad`][1] using jQuery:
-
-```javascript
-$(document).ready(function() {
- $('pre code').each(function(i, block) {
- hljs.highlightBlock(block);
- });
-});
-```
-
-You can use any tags instead of `` to mark up your code. If you don't
-use a container that preserve line breaks you will need to configure
-highlight.js to use the `
` tag:
-
-```javascript
-hljs.configure({useBR: true});
-
-$('div.code').each(function(i, block) {
- hljs.highlightBlock(block);
-});
-```
-
-For other options refer to the documentation for [`configure`][3].
-
-
-## Getting the Library
-
-You can get highlight.js as a hosted or custom-build browser script or as a
-server module. Head over to the [download page][4] for all the options.
-
-Note, that the library is not supposed to work straight from the source on
-GitHub, it requires building. If none of the pre-packaged options work for you
-refer to the [building documentation][5].
-
-
-## License
-
-Highlight.js is released under the BSD License. See [LICENSE][10] file for
-details.
-
-
-## Links
-
-The official site for the library is at .
-
-Further in-depth documentation for the API and other topics is at
- .
-
-Authors and contributors are listed in the [AUTHORS.en.txt][9] file.
-
-[1]: http://highlightjs.readthedocs.org/en/latest/api.html#inithighlightingonload
-[2]: http://highlightjs.readthedocs.org/en/latest/api.html#highlightblock-block
-[3]: http://highlightjs.readthedocs.org/en/latest/api.html#configure-options
-[4]: https://highlightjs.org/download/
-[5]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
-[8]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
-[9]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
-[10]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
diff --git a/inst/bsDemo/www/README.ru.md b/inst/bsDemo/www/README.ru.md
deleted file mode 100644
index 198c029..0000000
--- a/inst/bsDemo/www/README.ru.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# Highlight.js
-
-Highlight.js — это подсветчик синтаксиса, написанный на JavaScript. Он работает
-и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не
-зависит от каких-либо фреймворков и умеет автоматически определять язык.
-
-
-## Начало работы
-
-Минимум, что нужно сделать для использования highlight.js на веб-странице — это
-подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]:
-
-```html
-
-
-
-```
-
-Библиотека найдёт и раскрасит код внутри тегов ``, попытавшись
-автоматически определить язык. Когда автоопределение не срабатывает, можно явно
-указать язык в атрибуте class:
-
-```html
-...
-```
-
-Список поддерживаемых классов языков доступен в [справочнике по классам][8].
-Класс также можно предваоить префиксами `language-` или `lang-`.
-
-Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`:
-
-```html
-...
-```
-
-## Инициализация вручную
-
-Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
-использовать функции [`highlightBlock`][2] и [`configure`][3]. Таким образом
-можно управлять тем, *что* подсвечивать и *когда*.
-
-Вот пример инициализация, эквивалентной вызову [`initHighlightingOnLoad`][1], но
-с использованием jQuery:
-
-```javascript
-$(document).ready(function() {
- $('pre code').each(function(i, block) {
- hljs.highlightBlock(block);
- });
-});
-```
-
-Вы можете использовать любые теги разметки вместо ``. Если
-используете контейнер, не сохраняющий переводы строк, вам нужно сказать
-highlight.js использовать для них тег `
`:
-
-```javascript
-hljs.configure({useBR: true});
-
-$('div.code').each(function(i, block) {
- hljs.highlightBlock(block);
-});
-```
-
-Другие опции можно найти в документации функции [`configure`][3].
-
-
-## Установка библиотеки
-
-Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
-индивидуальную сборку, а также установив модуль на сервере. На
-[страница загрузки][4] подробно описаны все варианты.
-
-Обратите внимание, что библиотека не предназначена для использования в виде
-исходного кода на GitHub, а требует отдельной сборки. Если вам не подходит ни
-один из готовых вариантов, читайте [документацию по сборке][5].
-
-
-## Лицензия
-
-Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
-[LICENSE][10].
-
-
-## Ссылки
-
-Официальный сайт билиотеки расположен по адресу .
-
-Более подробная документация по API и другим темам расположена на
- .
-
-Авторы и контрибьютора перечислена в файле [AUTHORS.ru.txt][9] file.
-
-[1]: http://highlightjs.readthedocs.org/en/latest/api.html#inithighlightingonload
-[2]: http://highlightjs.readthedocs.org/en/latest/api.html#highlightblock-block
-[3]: http://highlightjs.readthedocs.org/en/latest/api.html#configure-options
-[4]: https://highlightjs.org/download/
-[5]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
-[8]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
-[9]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt
-[10]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
diff --git a/inst/bsDemo/www/demo.css b/inst/bsDemo/www/demo.css
deleted file mode 100644
index 3804fe5..0000000
--- a/inst/bsDemo/www/demo.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.intro {
- text-align: justify;
-}
-
-div.code {
- font-family: monospace;
- width: 100%;
- min-height: 200px;
- margin-bottom: 10px;
- padding: 10px;
- text-indent: -20px;
- padding-left: 30px;
-}
\ No newline at end of file
diff --git a/inst/bsDemo/www/demo.js b/inst/bsDemo/www/demo.js
deleted file mode 100644
index e42d629..0000000
--- a/inst/bsDemo/www/demo.js
+++ /dev/null
@@ -1,13 +0,0 @@
-hljs.configure({useBR: true});
-
-$('div.code').each(function(i, block) {
- hljs.highlightBlock(block);
-});
-
-Shiny.addCustomMessageHandler("displayCode", function(data) {
-
- var $div = $("#" + data.id);
- $div.html(data.content);
- hljs.highlightBlock($div[0]);
-
-})
\ No newline at end of file
diff --git a/inst/bsDemo/www/highlight.pack.js b/inst/bsDemo/www/highlight.pack.js
deleted file mode 100644
index 29bf365..0000000
--- a/inst/bsDemo/www/highlight.pack.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return window.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){var n=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);return n=n.map(function(e){return e.replace(/^lang(uage)?-/,"")}),n.filter(function(e){return N(e)||/no(-?)highlight/.test(e)})[0]}function o(e,n){var t={};for(var r in e)t[r]=e[r];if(n)for(var r in n)t[r]=n[r];return t}function i(e){var n=[];return function r(e,a){for(var o=e.firstChild;o;o=o.nextSibling)3==o.nodeType?a+=o.nodeValue.length:1==o.nodeType&&(n.push({event:"start",offset:a,node:o}),a=r(o,a),t(o).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:o}));return a}(e,0),n}function c(e,r,a){function o(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset"}function c(e){l+=""+t(e)+">"}function u(e){("start"==e.event?i:c)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=o();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){f.reverse().forEach(c);do u(g.splice(0,1)[0]),g=o();while(g==e&&g.length&&g[0].offset==s);f.reverse().forEach(i)}else"start"==g[0].event?f.push(g[0].node):f.pop(),u(g.splice(0,1)[0])}return l+n(a.substr(s))}function u(e){function n(e){return e&&e.source||e}function t(t,r){return RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var c={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");c[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):Object.keys(a.k).forEach(function(e){u(e,a.k[e])}),a.k=c}a.lR=t(a.l||/\b[A-Za-z0-9_]+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function s(e,t,a,o){function i(e,n){for(var t=0;t";return o+=e+'">',o+n+i}function d(){if(!w.k)return n(y);var e="",t=0;w.lR.lastIndex=0;for(var r=w.lR.exec(y);r;){e+=n(y.substr(t,r.index-t));var a=g(w,r);a?(B+=a[1],e+=p(a[0],n(r[0]))):e+=n(r[0]),t=w.lR.lastIndex,r=w.lR.exec(y)}return e+n(y.substr(t))}function h(){if(w.sL&&!R[w.sL])return n(y);var e=w.sL?s(w.sL,y,!0,L[w.sL]):l(y);return w.r>0&&(B+=e.r),"continuous"==w.subLanguageMode&&(L[w.sL]=e.top),p(e.language,e.value,!1,!0)}function v(){return void 0!==w.sL?h():d()}function b(e,t){var r=e.cN?p(e.cN,"",!0):"";e.rB?(M+=r,y=""):e.eB?(M+=n(t)+r,y=""):(M+=r,y=t),w=Object.create(e,{parent:{value:w}})}function m(e,t){if(y+=e,void 0===t)return M+=v(),0;var r=i(t,w);if(r)return M+=v(),b(r,t),r.rB?0:t.length;var a=c(w,t);if(a){var o=w;o.rE||o.eE||(y+=t),M+=v();do w.cN&&(M+="
"),B+=w.r,w=w.parent;while(w!=a.parent);return o.eE&&(M+=n(t)),y="",a.starts&&b(a.starts,""),o.rE?0:t.length}if(f(t,w))throw new Error('Illegal lexeme "'+t+'" for mode "'+(w.cN||"")+'"');return y+=t,t.length||1}var x=N(e);if(!x)throw new Error('Unknown language: "'+e+'"');u(x);for(var w=o||x,L={},M="",k=w;k!=x;k=k.parent)k.cN&&(M=p(k.cN,"",!0)+M);var y="",B=0;try{for(var C,j,I=0;;){if(w.t.lastIndex=I,C=w.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}m(t.substr(I));for(var k=w;k.parent;k=k.parent)k.cN&&(M+="");return{r:B,value:M,language:e,top:w}}catch(A){if(-1!=A.message.indexOf("Illegal"))return{r:0,value:n(t)};throw A}}function l(e,t){t=t||E.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(N(n)){var t=s(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function f(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\n/g,"
")),e}function g(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/(\s|^)hljs(\s|$)/)||a.push("hljs"),r&&a.push(r),a.join(" ").trim()}function p(e){var n=a(e);if(!/no(-?)highlight/.test(n)){var t;E.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/
/g,"\n")):t=e;var r=t.textContent,o=n?s(n,r,!0):l(r),u=i(t);if(u.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(u,i(p),r)}o.value=f(o.value),e.innerHTML=o.value,e.className=g(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)}function b(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function m(){return Object.keys(R)}function N(e){return R[e]||R[x[e]]}var E={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=s,e.highlightAuto=l,e.fixMarkup=f,e.highlightBlock=p,e.configure=d,e.initHighlighting=h,e.initHighlightingOnLoad=v,e.registerLanguage=b,e.listLanguages=m,e.getLanguage=N,e.inherit=o,e.IR="[a-zA-Z][a-zA-Z0-9_]*",e.UIR="[a-zA-Z_][a-zA-Z0-9_]*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},e.CLCM={cN:"comment",b:"//",e:"$",c:[e.PWM]},e.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[e.PWM]},e.HCM={cN:"comment",b:"#",e:"$",c:[e.PWM]},e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("python",function(e){var r={cN:"prompt",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},l={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},c={cN:"params",b:/\(/,e:/\)/,c:["self",r,l,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,l,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n]/,c:[e.UTM,c]},{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("r",function(e){var r="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[e.HCM,{b:r,l:r,k:{keyword:"function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",c:[e.BE],v:[{b:'"',e:'"'},{b:"'",e:"'"}]}]}});
\ No newline at end of file
diff --git a/inst/bsDemo/www/styles/arta.css b/inst/bsDemo/www/styles/arta.css
deleted file mode 100644
index 9f61a0e..0000000
--- a/inst/bsDemo/www/styles/arta.css
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-Date: 17.V.2011
-Author: pumbur
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #222;
- -webkit-text-size-adjust: none;
-}
-
-.profile .hljs-header *,
-.ini .hljs-title,
-.nginx .hljs-title {
- color: #fff;
-}
-
-.hljs-comment,
-.hljs-javadoc,
-.hljs-preprocessor,
-.hljs-preprocessor .hljs-title,
-.hljs-pragma,
-.hljs-shebang,
-.profile .hljs-summary,
-.diff,
-.hljs-pi,
-.hljs-doctype,
-.hljs-tag,
-.css .hljs-rules,
-.tex .hljs-special {
- color: #444;
-}
-
-.hljs-string,
-.hljs-symbol,
-.diff .hljs-change,
-.hljs-regexp,
-.xml .hljs-attribute,
-.smalltalk .hljs-char,
-.xml .hljs-value,
-.ini .hljs-value,
-.clojure .hljs-attribute,
-.coffeescript .hljs-attribute {
- color: #ffcc33;
-}
-
-.hljs-number,
-.hljs-addition {
- color: #00cc66;
-}
-
-.hljs-built_in,
-.hljs-literal,
-.hljs-type,
-.hljs-typename,
-.go .hljs-constant,
-.ini .hljs-keyword,
-.lua .hljs-title,
-.perl .hljs-variable,
-.php .hljs-variable,
-.mel .hljs-variable,
-.django .hljs-variable,
-.css .funtion,
-.smalltalk .method,
-.hljs-hexcolor,
-.hljs-important,
-.hljs-flow,
-.hljs-inheritance,
-.parser3 .hljs-variable {
- color: #32aaee;
-}
-
-.hljs-keyword,
-.hljs-tag .hljs-title,
-.css .hljs-tag,
-.css .hljs-class,
-.css .hljs-id,
-.css .hljs-pseudo,
-.css .hljs-attr_selector,
-.hljs-winutils,
-.tex .hljs-command,
-.hljs-request,
-.hljs-status {
- color: #6644aa;
-}
-
-.hljs-title,
-.ruby .hljs-constant,
-.vala .hljs-constant,
-.hljs-parent,
-.hljs-deletion,
-.hljs-template_tag,
-.css .hljs-keyword,
-.objectivec .hljs-class .hljs-id,
-.smalltalk .hljs-class,
-.lisp .hljs-keyword,
-.apache .hljs-tag,
-.nginx .hljs-variable,
-.hljs-envvar,
-.bash .hljs-variable,
-.go .hljs-built_in,
-.vbscript .hljs-built_in,
-.lua .hljs-built_in,
-.rsl .hljs-built_in,
-.tail,
-.avrasm .hljs-label,
-.tex .hljs-formula,
-.tex .hljs-formula * {
- color: #bb1166;
-}
-
-.hljs-yardoctag,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.profile .hljs-header,
-.ini .hljs-title,
-.apache .hljs-tag,
-.parser3 .hljs-title {
- font-weight: bold;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.6;
-}
-
-.hljs,
-.hljs-subst,
-.diff .hljs-chunk,
-.css .hljs-value,
-.css .hljs-attribute {
- color: #aaa;
-}
diff --git a/inst/bsDemo/www/styles/ascetic.css b/inst/bsDemo/www/styles/ascetic.css
deleted file mode 100644
index 693bbc5..0000000
--- a/inst/bsDemo/www/styles/ascetic.css
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-
-Original style from softwaremaniacs.org (c) Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: white;
- color: black;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-filter .hljs-argument,
-.hljs-addition,
-.hljs-change,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.nginx .hljs-built_in,
-.tex .hljs-formula {
- color: #888;
-}
-
-.hljs-comment,
-.hljs-shebang,
-.hljs-doctype,
-.hljs-pi,
-.hljs-javadoc,
-.hljs-deletion,
-.apache .hljs-sqbracket {
- color: #ccc;
-}
-
-.hljs-keyword,
-.hljs-tag .hljs-title,
-.ini .hljs-title,
-.lisp .hljs-title,
-.http .hljs-title,
-.nginx .hljs-title,
-.css .hljs-tag,
-.hljs-winutils,
-.hljs-flow,
-.apache .hljs-tag,
-.tex .hljs-command,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
-}
diff --git a/inst/bsDemo/www/styles/atelier-dune.dark.css b/inst/bsDemo/www/styles/atelier-dune.dark.css
deleted file mode 100644
index 639c49d..0000000
--- a/inst/bsDemo/www/styles/atelier-dune.dark.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Dune Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Dune Dark Comment */
-.hljs-comment,
-.hljs-title {
- color: #999580;
-}
-
-/* Atelier Dune Dark Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #d73737;
-}
-
-/* Atelier Dune Dark Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #b65611;
-}
-
-/* Atelier Dune Dark Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #cfb017;
-}
-
-/* Atelier Dune Dark Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #60ac39;
-}
-
-/* Atelier Dune Dark Aqua */
-.css .hljs-hexcolor {
- color: #1fad83;
-}
-
-/* Atelier Dune Dark Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #6684e1;
-}
-
-/* Atelier Dune Dark Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #b854d4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #292824;
- color: #a6a28c;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-dune.light.css b/inst/bsDemo/www/styles/atelier-dune.light.css
deleted file mode 100644
index 09da34b..0000000
--- a/inst/bsDemo/www/styles/atelier-dune.light.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Dune Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Dune Light Comment */
-.hljs-comment,
-.hljs-title {
- color: #7d7a68;
-}
-
-/* Atelier Dune Light Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #d73737;
-}
-
-/* Atelier Dune Light Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #b65611;
-}
-
-/* Atelier Dune Light Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #cfb017;
-}
-
-/* Atelier Dune Light Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #60ac39;
-}
-
-/* Atelier Dune Light Aqua */
-.css .hljs-hexcolor {
- color: #1fad83;
-}
-
-/* Atelier Dune Light Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #6684e1;
-}
-
-/* Atelier Dune Light Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #b854d4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #fefbec;
- color: #6e6b5e;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-forest.dark.css b/inst/bsDemo/www/styles/atelier-forest.dark.css
deleted file mode 100644
index 2024a1e..0000000
--- a/inst/bsDemo/www/styles/atelier-forest.dark.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Forest Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Forest Dark Comment */
-.hljs-comment,
-.hljs-title {
- color: #9c9491;
-}
-
-/* Atelier Forest Dark Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #f22c40;
-}
-
-/* Atelier Forest Dark Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #df5320;
-}
-
-/* Atelier Forest Dark Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #d5911a;
-}
-
-/* Atelier Forest Dark Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #5ab738;
-}
-
-/* Atelier Forest Dark Aqua */
-.css .hljs-hexcolor {
- color: #00ad9c;
-}
-
-/* Atelier Forest Dark Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #407ee7;
-}
-
-/* Atelier Forest Dark Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #6666ea;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #2c2421;
- color: #a8a19f;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-forest.light.css b/inst/bsDemo/www/styles/atelier-forest.light.css
deleted file mode 100644
index 0c8ae45..0000000
--- a/inst/bsDemo/www/styles/atelier-forest.light.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Forest Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Forest Light Comment */
-.hljs-comment,
-.hljs-title {
- color: #766e6b;
-}
-
-/* Atelier Forest Light Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #f22c40;
-}
-
-/* Atelier Forest Light Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #df5320;
-}
-
-/* Atelier Forest Light Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #d5911a;
-}
-
-/* Atelier Forest Light Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #5ab738;
-}
-
-/* Atelier Forest Light Aqua */
-.css .hljs-hexcolor {
- color: #00ad9c;
-}
-
-/* Atelier Forest Light Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #407ee7;
-}
-
-/* Atelier Forest Light Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #6666ea;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f1efee;
- color: #68615e;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-heath.dark.css b/inst/bsDemo/www/styles/atelier-heath.dark.css
deleted file mode 100644
index c155d34..0000000
--- a/inst/bsDemo/www/styles/atelier-heath.dark.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Heath Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Heath Dark Comment */
-.hljs-comment,
-.hljs-title {
- color: #9e8f9e;
-}
-
-/* Atelier Heath Dark Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #ca402b;
-}
-
-/* Atelier Heath Dark Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #a65926;
-}
-
-/* Atelier Heath Dark Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #bb8a35;
-}
-
-/* Atelier Heath Dark Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #379a37;
-}
-
-/* Atelier Heath Dark Aqua */
-.css .hljs-hexcolor {
- color: #159393;
-}
-
-/* Atelier Heath Dark Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #516aec;
-}
-
-/* Atelier Heath Dark Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #7b59c0;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #292329;
- color: #ab9bab;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-heath.light.css b/inst/bsDemo/www/styles/atelier-heath.light.css
deleted file mode 100644
index 40f4090..0000000
--- a/inst/bsDemo/www/styles/atelier-heath.light.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Heath Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Heath Light Comment */
-.hljs-comment,
-.hljs-title {
- color: #776977;
-}
-
-/* Atelier Heath Light Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #ca402b;
-}
-
-/* Atelier Heath Light Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #a65926;
-}
-
-/* Atelier Heath Light Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #bb8a35;
-}
-
-/* Atelier Heath Light Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #379a37;
-}
-
-/* Atelier Heath Light Aqua */
-.css .hljs-hexcolor {
- color: #159393;
-}
-
-/* Atelier Heath Light Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #516aec;
-}
-
-/* Atelier Heath Light Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #7b59c0;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f7f3f7;
- color: #695d69;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-lakeside.dark.css b/inst/bsDemo/www/styles/atelier-lakeside.dark.css
deleted file mode 100644
index 8f1aa6a..0000000
--- a/inst/bsDemo/www/styles/atelier-lakeside.dark.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Lakeside Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Lakeside Dark Comment */
-.hljs-comment,
-.hljs-title {
- color: #7195a8;
-}
-
-/* Atelier Lakeside Dark Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #d22d72;
-}
-
-/* Atelier Lakeside Dark Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #935c25;
-}
-
-/* Atelier Lakeside Dark Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #8a8a0f;
-}
-
-/* Atelier Lakeside Dark Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #568c3b;
-}
-
-/* Atelier Lakeside Dark Aqua */
-.css .hljs-hexcolor {
- color: #2d8f6f;
-}
-
-/* Atelier Lakeside Dark Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #257fad;
-}
-
-/* Atelier Lakeside Dark Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #5d5db1;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #1f292e;
- color: #7ea2b4;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-lakeside.light.css b/inst/bsDemo/www/styles/atelier-lakeside.light.css
deleted file mode 100644
index 96426d3..0000000
--- a/inst/bsDemo/www/styles/atelier-lakeside.light.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Lakeside Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Lakeside Light Comment */
-.hljs-comment,
-.hljs-title {
- color: #5a7b8c;
-}
-
-/* Atelier Lakeside Light Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #d22d72;
-}
-
-/* Atelier Lakeside Light Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #935c25;
-}
-
-/* Atelier Lakeside Light Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #8a8a0f;
-}
-
-/* Atelier Lakeside Light Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #568c3b;
-}
-
-/* Atelier Lakeside Light Aqua */
-.css .hljs-hexcolor {
- color: #2d8f6f;
-}
-
-/* Atelier Lakeside Light Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #257fad;
-}
-
-/* Atelier Lakeside Light Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #5d5db1;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #ebf8ff;
- color: #516d7b;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-seaside.dark.css b/inst/bsDemo/www/styles/atelier-seaside.dark.css
deleted file mode 100644
index 72f8430..0000000
--- a/inst/bsDemo/www/styles/atelier-seaside.dark.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Seaside Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Seaside Dark Comment */
-.hljs-comment,
-.hljs-title {
- color: #809980;
-}
-
-/* Atelier Seaside Dark Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #e6193c;
-}
-
-/* Atelier Seaside Dark Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #87711d;
-}
-
-/* Atelier Seaside Dark Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #c3c322;
-}
-
-/* Atelier Seaside Dark Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #29a329;
-}
-
-/* Atelier Seaside Dark Aqua */
-.css .hljs-hexcolor {
- color: #1999b3;
-}
-
-/* Atelier Seaside Dark Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #3d62f5;
-}
-
-/* Atelier Seaside Dark Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #ad2bee;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #242924;
- color: #8ca68c;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/atelier-seaside.light.css b/inst/bsDemo/www/styles/atelier-seaside.light.css
deleted file mode 100644
index dff5767..0000000
--- a/inst/bsDemo/www/styles/atelier-seaside.light.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Base16 Atelier Seaside Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-/* https://github.com/jmblog/color-themes-for-highlightjs */
-
-/* Atelier Seaside Light Comment */
-.hljs-comment,
-.hljs-title {
- color: #687d68;
-}
-
-/* Atelier Seaside Light Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #e6193c;
-}
-
-/* Atelier Seaside Light Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #87711d;
-}
-
-/* Atelier Seaside Light Yellow */
-.hljs-ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #c3c322;
-}
-
-/* Atelier Seaside Light Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #29a329;
-}
-
-/* Atelier Seaside Light Aqua */
-.css .hljs-hexcolor {
- color: #1999b3;
-}
-
-/* Atelier Seaside Light Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #3d62f5;
-}
-
-/* Atelier Seaside Light Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #ad2bee;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f0fff0;
- color: #5e6e5e;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/brown_paper.css b/inst/bsDemo/www/styles/brown_paper.css
deleted file mode 100644
index d456bd4..0000000
--- a/inst/bsDemo/www/styles/brown_paper.css
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-
-Brown Paper style from goldblog.com.ua (c) Zaripov Yura
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background:#b7a68e url(./brown_papersq.png);
- -webkit-text-size-adjust: none;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.hljs-change,
-.hljs-winutils,
-.hljs-flow,
-.nginx .hljs-title,
-.tex .hljs-special,
-.hljs-request,
-.hljs-status {
- color:#005599;
- font-weight:bold;
-}
-
-.hljs,
-.hljs-subst,
-.hljs-tag .hljs-keyword {
- color: #363c69;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-type,
-.hljs-tag .hljs-value,
-.css .hljs-rules .hljs-value,
-.hljs-preprocessor,
-.hljs-pragma,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.ruby .hljs-class .hljs-parent,
-.hljs-built_in,
-.django .hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-javadoc,
-.ruby .hljs-string,
-.django .hljs-filter .hljs-argument,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-addition,
-.hljs-stream,
-.hljs-envvar,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-number {
- color: #2c009f;
-}
-
-.hljs-comment,
-.hljs-annotation,
-.hljs-decorator,
-.hljs-pi,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in,
-.tex .hljs-formula {
- color: #802022;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.css .hljs-id,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-title,
-.hljs-type,
-.vbscript .hljs-built_in,
-.rsl .hljs-built_in,
-.smalltalk .hljs-class,
-.diff .hljs-header,
-.hljs-chunk,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.tex .hljs-command {
- font-weight: bold;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.8;
-}
diff --git a/inst/bsDemo/www/styles/brown_papersq.png b/inst/bsDemo/www/styles/brown_papersq.png
deleted file mode 100644
index 3813903dbf9fa7b1fb5bd11d9534c06667d9056f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 18198
zcmZsCRajhYlWil7yGw9LaCaw2kl^kP!M%at?m>cka0u>ctf6s&e8CzTLSrGMaSIUS
zWM7q;>fa~s$OpT>
zFLY-GO$7j;Wl{{7eE9cF?XPU&ukYpLA870A2vBhFvU6lq^RRVx)N{0T2=eQ4J41(5=2G+8;)w1ZEPMkbF2bGnazV|OLZz2Hb@=WyXBX0)f+0o;fWze0N{t<*y
ztIiNnZC{LRA&k!$ZY8RSSkRr34SfzyO1FQ1#+`5DKBGKIaW*#IpS|)H)0b)RO)vVT
zdmZs``V5~Rd=7^niGNRi-KohFdl7;cLNt=6H%jET$<@@a?HPC}DI+UeV-R$j(|Cgb
zovyEp&h`&JS~h*u+dsTgScW2zDVr4f~DH;Zx@cQhlKiyzUik!{j?26_bcGl3n
zz;xi(8ENgs!;6LMT9?9^)|SgIm+Xu<9pAn@Jwvr@j|kU$Ps<;yJK|Ptilz{)cF~50
z>3}X}-GE2L$gd5vToUcA;ufTe+vCmq6y;EHLIF1Y)!*mMIk7Ufz`-6@{%j+0t}5by-kjAimHgt*AfoWQ3<}2%HH1G)X=gxwsGTnqo!jS
zPp^mHU)Wdo9i$J93f_cGL~o081HVh2MIfFb&r#24&zMhy4-B`@-M4wqKeV5e3rOCk
zzfxnXb=ed%7QxZsGFZ!Bk=ojIqXM0lz`=t&N`(ieb`uT$vaWG--x!ps=kokELG7^v
z+{LRR;H>H{+#Sy9)~}T-X{s*WDIF9ko?!YOUrBL6c1UTt%|c-C%-R`h{*D&-?xTv6%U;Fy)q@zD7n;Mm&VTYo!f>`4|^@IrUrWqi<2`
zIK=%8Y>k7_cJFc62Fm1dsu5V%^D!kOF(oA;3duw
z%pO09{DvbtIv+U1{6MQ8Wq|e~4(8RFaZSiu$
z|CJ~BTvRLdM64V`xYr`XpzSoka%-H{0)Ro-jT6+}
zT18|CY&T<`K}73~WMQMkzj<-{e`EjOV2Ch(n321C+#16;>MjIhblly|M?Br0UERMA
z8yIvk9sVuv0~h)1=S{wY{&V6fDi@0c8|@S!>h`gR_^u~(f!y=uu=3o8U2>$VV-mwV
zeJKl8K*mz%0O$3!XmmqEd#rW!>oY?U<|?CBsX=UMCSrinA}B9GA5MTUzn%ILQD=}Q
z^-qc}to5D!{UYEBFfSF{7{}5#I2`7!9Xcs|{e!rTVYvNetFc@43N$#e!DM_Y#5_4V
z3P*)qJyw97IJGZYj53iEQKK~Zk6QE|wnDAQ6e%ci7WM9yX{3Voy>2v7-{dW*|+Zvy7%^(o^DMc&%_Tp}4@Jo%0Bs7ObY$K2QS=1v19slY*WwV!8B05I;*7gc|
zC}iWT!ocL=zoXCa-*EVkQZPGoFVou4>|(ng{&T`5ns(d;`0IWRE4$3aCE
zX={pif)xfKL2J&CwL-rbsVhFX~Ast|24AzGCb$6bP
zzjP96&p17?0`zA}Cr(1{-
zBWmAc^Tih%c@PSpJD39Rtvbpc27|&`W}18q&trP3z4xp%4^t5T!T})zWON*!hQ+0C
zGnKXI-(t5+$xcN_*!vy^Ebcn(`}3GQ=EjrR)jEu#)a!Qo+uU^L6Sf!vtQo@-)YCH_
zIkq!}#RQ?#H9Na)c>fA?i%F=AwN>+%6IHG_6~07@;tNMw)pj-py?fm5OAkUXC)Brp
z)eG?cTAV-ODy=aRrlcS^!0S!95GOO@_zy6Yr~oZODHiWB(rYDHVW+oP+iSHanvW_2
zD+33#kuvw;P&BQf8OM-`63t1%h)cdnm8}>fIrS=425~>gpk!*nOPF^FRJ!}0{NO(e
z1ANE&sU_mPMS;Pw9^8F*v5!k1Dr?=^%?eWij0f~to7y`V{K(<#9fgxsh1qZ}irc;t
zApc;fE}TBG^?-(ZYfC3hk)rzA9||a50&`5$fOMODInB^CQQz-%|FVW(Me6cd&RQ!Em*`8(cOiTV*}I0^
zkh9#bz+b`^Achh+t!T{E%m*7Spr8X*#NFvrNeQKR9N#NYImXo$orFW}S#|kp!g)
zC|mslRtj
z{<(wk5heSmNTLQPjVu+tu`Ax0<Jp<3;sv=x5%C^te-lbQRUIA>ktvMAj}|$FYU$Qp}=T~;pv%9btR=dxklUy
zkR9E*9e)3CPHhghYGI4o&yB<6Ek^@&s6_$^hHm%y;$mG#6s2Gj@yUh|7NNvbZ*-CiW>(`$PB*?kxl)}lSZKB^Wx?u%oy%PiU;Ucb|V
z|JbtHI`e>wDu43V9mbmTz-O*hsj=x3p@_52uHWdv$KHWXIJ?hAN_O+SE^)}7#rG|6
z_BKM`Ghwpm2fNaI-XM&&0MIfLw+nk~2$Q9!(m1H({sIm*PjV$tD(vHzF8J^I
z$5d)V3#P=#{X0~lkvdz*hO?2|P39$67m%BB>cJ;P&i?e>f6oD0A_x(fXnlhN8_iy~
z=8_i6_?scR{Q@F{<_+s`6F0?)4q>Y!TZURG@z1Xg(XF|Uq<7M}+x3!5CKzKPU%EBw
zWsc%dMB{e=rbNFynyQz;$Wk>xdNDkRB!r}hPlheoBDRi4NdE0U68C8T=FwmB)E|du
zu(3Ry^ER}qt8o=s^t;)ka7?Rw9BkK-AbMm!5YyN{n8j%4(FS=#^NXNFzOKvDh-fh_
ztrMuN#+;}%O*fdC_O-zikI?cL4FkQFbMJ&%;LsLdp2pU1z81byeDrcnfVfSPjd&Tx
z0uTNCRa&zYgwCK{AP>=r8Sx{G=0I#zQ4SAF*CLY5@Ge_3>$_ebR&z8QuoP^G_nMbA
zR!J5=NfW+bA;6g4yh|56J$}zRiUEt*T!NqU4MM$Ik(YO5ElC
z3I>TTR5(&RS-e$~mJ610i3Tb|O!%oihx2Dou=SDi
zY8QGbi&iMst0x9N)(Qw|m<=v9=H$h=d9q7_RC$8&xiTCpO(nAT)09jNd*kDz)xA=d
zA>mDJMEO}wm=z8%##p8Epux^Z?6*hT+bBf^Yw~9wh1mOBI2*B_&;n6YqN$_sLi+`r
zN+}oUEH%!)UEZO0kGwoV{fV0125Liy{XQRjOG;ll15xL$5w(ynu*BE#Y!uUbJlqhC
z*)p9Akd=!p3VXT;Mo_Zvej_{xJkq)x&0<&B)@Utjud|co5aPb~dM)3OKXKmRzZ}RD
zt~hR#D>70m`e$6d9RY-q2@W6QANld%IvZ*VmwpbdVCzWDJ`&UO%hC*(c9AJ;
z8qe|b;=knC|ZRghL9-j+JpIpBjS
zLIz{G#rkZ%K&UOs1pgA;bi1JjfXryT;9AV*AdF1(P;A$V^MMS0X10gTzoNjJBTB;U
z#kJ5|QkG?|zHY}$^ddtj_$wAkIcd;Wk|&B6^`fnOL3uIPj@Z+b!gftAC_YE@sh~EY
z@awBver>U-j(pBMf%*W;OI?#3J3yRO&^PqFHW`#yr|%#0rDM+^ZV
zw!IXpiDk0Qo5iL_mNZlA`+m>mgyn-Z9(
z1VK4OJry2Iq?o90-NhDNVAP3Niev{MJh~PQ7M5U9?Ob1#H}q=Dgn%~Ng=3b;7jX>n
zADv=?=pgaOIN2G2JCr_(7k0YF#OlE0c}by4_|pb-iJ-CYzLbWwHs2A)ZY;uuYwbQMUa1ed5)1G+DXr$;MC*sQ-N@4$xD327+bTrT^
z?kmr?X}=Lu2xf7X5|gkw#k>FEC139#QtL*Y>C)kvvqB=d;fVQ8{+;RhP-)is9rX&jj-Ik
zT00%|O4wv`6`(M(&W*hs2A
z?qIa9QPvO>*ssTM+$((GcA1>?(C1jm10t6@Dy(k%HtIN+5d!Bk;~J%32ZhcKu$-i2gOM1Ek)Av0js<&PBErK4
zp0BqauJ^Yy7bnHdyGOO!FbWP*qG)O@I>y%wAIOX9eD)7R>ow6xlYRy-h|ZmQaLshv
zm7r7H)>I5~>_i>NDSv6k)mCwZu$9K6)JGn#ni#>O5}3aMrYt7e67}_&zNlt_@b&$n
z)VO|sK6qnt57(FA0!{d&$}h!DdNgOgYMn=8${CJ>S2YIAe
zYh9atd77_K6soYC+WALnJL7SxqnE#(+1G`m^0I56gta@e+L0z>IRG+?>DS@Oe-NlQ
z-mQ)F{=7b($L)X@jB5Ot*D*>ceMR8793ItK-tTO`iAnNm-xzYn0#;&=gXJYz8KmnUBrL#cb@ELwnkp?O
zZZ{8tSRklRk}8Ts29G>v-&z?qob#qYSe!ek
zt^r`X2W(J?(qxhOf%h#^?8D`^&MPbuUE9s
z$80u<1iU&&+mQB<4bZeyBaOB}$!d@`^f4+iXS3;h>rXP~*FRrr)Wki^(q)&EwAMt?71xOWwtXa8UsY(_;C*7d*d9Z
z-#(@Mu>`+6lrEC|=E^q^u&A=e+P9|#`hdP0Rg9`gUbNqm@!-Gg-V6vL;!*U<4ZtIa
zv@cWy_^m4cV=F@sv3lCwx|?r%lb?NGQobaWMi<9dngpq({-uy?xwARMBUtybddE
z1Ka>|_TRpK@#mBE#M;ka;RDR*2pXmP#YHG|5qh#YgXDUPD*cs3)>>Co@wnbArjo;_^QGnuQGdUSqu6AMPxBHbW99c9gHFZ*u&-M5cS}n@d
z@wWUbV?X7y#NTCaqV_t*)w+Vzpte?L^08$=xiju5lCZ4~#~@34qa{rJM!{y~Tqe5H
z-`N}U;ZKj9jnYas%EXCD=*$|XC$h{m@?;&T(uT--QOR_H^PcjyAP~pc&dS&v#J%KN
zK|)APC-pnC;EKdibKx8O+Pqef?
zY3J^)uf~;VDge4m$gh`Aj{?OYnES!Tftm1kjZwLB-5soBf8q9RaPk~e{SqHq+Gh(R
z<}KbtcWaoIC!do+k`h}5s~QzJRo?TzU_eO^xAgvNoX&oKS7|-8Lm;%2@BRKwb9H4rRICqXPIQLdOMGtG>0(Kh}5xDzW
z<`R5ub7|^ov6hX(i^R_d6ZdLQ5t}vu@?2|ueBl^W!CoR=LZ1Urel(cC{`jK##xJ5Z
zW6m&PFV^e{7~mrz4!xy@n!O%C(vIRG0g>FrE1t+=n3;z9D!vWHCUjqMi*QAc4!hId
zk9MAo2%jf}g*lzYPM7_RYQxo3rJR%jUCd5FoBmmSn@QTM@?QERM*E-uEb}GD!7+W4
z;ucS;Fa1*ZgF9U&8>R&|tjy3FH;93-Kpof^^nCm9kp4U+SFqwi@6}>$jo4)7x?L*p
z5eHsG=We;aDoq*x+H6v7x39;dP<1mgK0fQuG+#L+=2<$z#m5Z5
zCEto{j1wIIxQ(7>!yi2iRgQS~c_6N5JHqo=$`q=PD?Y@90#727stD}1n!C~qy
z1q^LAqT}jq4r2TFIf&-|vYu|DXI}0>^}2ev5jUXZCM+ZOWL>l4t}d2Pur%y+XM$j(Cc126Ww7ST~4S;g=2q8j3!|OoWynEtKkuUjZ>k
za%azP+sS^P^KJ=|`TAdnlNkRHqn@0nFWdFeMoI4-_sH22UA`hq_xA?B;_u;ixDrx%9ajWMqLgzfYCofw8KF`gO
zWh92d@!_T((;rc7)Y0;~o3^0R^ALS8opgP}hX%hpsuO^eo@L^`#d1RJD{m2kN6wGw
z5T;|y=;jNZl}W2j;Bc$yGn_%Ti(Jtk4%`
zDK5cCl`%fdh(p%F!
zN4;@Huf@ukLx1k|0(qt;@&Xiw=4#8cVPcfFDX~atn}9jl7(Tz#p-Q|4F%ywo(jlv#
z%qISsaHlw>1|(CS*2KqRSCP8NF(6NfJ>HP|lV`v4llSyqeD!0%X_1>
zg{vvN5D0m~n!O3#;}}s;n>z%iE0e^EX_%IQaWRp4yx4LOzqV3T+W(;k{udVh!#EJ}
zgnXu%H1P~HO=bwcbt57%T)u4QT05g9BA!O6PoHP#DPg-80&W|M33F=n@!{4j6>-=9
zl9KJP6S3H+U>;T?}#WA
z_O%upq*IdOTe9b~q#{Y}07vk515LC)Il|+Aa$f}Tcr-&vQOIH)UZ$6&
z36g&<+>7?MFwXUe`uwpa`gVyIwLJn~p1QK-H&X5vGa};Wdy^Q_m|$Lgl*a(g9EO{h
z##w%7(g(SjboyvXP~vP72(|N1)ZI{XNa-&bPjF54D`q-}^mUm=DGk7I_a#t~zNU)>
zJD=vyGTVi2y}*&qMByXD3Tn-Wj|5S#f(
z1uWJ`3RnO6rh+Yy?c=B~PUJ?nV_{w6l7FulT#(2M_~r)HsCX+L?$5L39mEvBSU`8$
zYq&EhHXoxg(J-om_c-fe@=~3q#OG#^kYLhMnV)y;ZF6Gqz_mr2P
zugbL0xc8{kyxRcLC?m)K&Yj$%)>_B@og|1@e~QPf=dh!p2dBQAtX$a~q4}AI9ArA;
za(4@-P0mv5dlML~u;DO#U*_mx8yZv31rn3O5F4pLW;#xXKA<~u3@cMIw&h)_VR
G3S-EN>9CM!{YB*|;6wg-K3V?)eR((z#1
zHyX+Us~H@9)~!8`K-#ZDU>v8HpiaQ|@=VU5MgT@ehzQ(1nZ!M0ZDk{Fb`>pCb0vQE
z`gX@ZK}6S!(-($v3w8-+L6Xs~;@WTrR}q42gH9p2ncZYDab8*`#p8jbS&H9$DTx{1
z|8L)r+}X3oIp6b9dN^fZsl0TpRK4NW^TVGZOit8~r*qM+QL3pd7G0|~C`PHxw2PM3
z->n8iEh)LU)Je%r7nEt|D%&F&(={XI*19z_HKI38aE6Cfm-buU7W|=mo3gMA57~g`
z7aBx4OS&(O5w@W;2pO@ZVyG;2^F+2cYshx%M2*M@%;(4quYc}>z1WX(9ccb&>8#{j
zE=VlFg+&2-xsr%AY_}ciz4+<$^}2TO2e)byPmJl?+aOU7{UVx$=ZNQDTQLxsh}+(_
zak-NBw`v4=+Ydp_L=w^J1&NT$-AbEUuj%8LN7nJzt^APyl$(ght>;(o{)xCqf8IX6
zq`a-CyPq$UOPJN(oo>$gX?v65Y$GnIq7Fq?=??};kY4#Na69k#iG|Wd|{Tt
z&uFLgaDQ4)`{9^3rX|Bg
zNY8N2w1??HVsq#}Xk&RcmoQBacog;CZ%I-HU?7dT+nZRo?h7BQd5Yrv%sI0rPF^Sk^9@l-_4``bwK!A
z5Ud{#8B%fMPHat04G9kj%j5>0maQK}jQTzGC!2<9FicZ-#V^ZaC)A?QK9EelA!nP)
z+Z2DqYAqTsfZ9k1CW9+h;Uao59}OnJ9>r}xs&nHlM5^Y58T*TkM80zn8=UE2e8u{j
zpH(Cv<_IWBdh<6_f1={d7#R|wGLcIoegMU>82VZLrcn;{FuCmF59Tpu7qQ5TEj5`AFXQxx{XS6|0N#
z3g?J^0RDM8_l@3M4G0f^O03>$S#_it3cdG%7HWo_Xb-<{a&XHHzW`(2t54<~-m{AO)J~7AhPI
zbkz9A9Eq!7aijhY%^=rG`j6?w^hb13^_LKf!X*}jaV$GaXvsies~+H0T#v%OcveHN
zw6t*A@XdVfqJIPsPwPO4;>%M4C+{dTVU{cOk`3puW6b36K2&z%>btSk&&H>Z;<`p>
z`FMTMiHw&wOXcQ$-Y{pG@3aN}s_>;#
zeQ6GDsqIMA?iz{B1XzIIegeu-#qL_ZBH|eh`L{~J(A{bH*vND8W}io(WZ9s;;m3qZ
zElXp!ru)Ht+yJJ|dfvRtcX?~Pn_nW{zZbM5z3mB?Hbf_|+7ZC-9yVjR&7mnNul4vE
z%KEK*b1~tReV{kNh2E=&iwgU8w0kYs3c1o6m;*fZfrF-g?1!~+<-`f!Dj8+i7NJUI
zcZj}vt?|8iHQ3TdM;gn(X(Vidn!cd{^x{>dX&Vt^`^_3pu?t)#>x|K0cW=egSMl9#+mqq-8|RdMP1Dw
zx^5}L#|i6)ERW8LBjm}wD6@3$`!cXl0aV*W>(xz)J2m+v|RNGEXIA%XWv
z$Hx$v!@W5LfaU7iEY}no2e;*F&dh{F;<$?``JyH&l3RVjA{xC=Rq{
z6}dLQKK(BW4N!Y)Mzd3h)PX8L3OR6JX82vsk!K2=fGX6aY;;A)HZGGb}75<{uxX
zkhV+ntp7HV{y%c)l^Ai?67k4&6NU3ZyurWYD?w*Qj*(z}17rs@Aw;Q94T!Fg@K!Sn
zsAbYnXgAJgNnt%$bTut_I2mveeqHC8Faxz$2j&9JB3~`l(8gbSfTOt8G(TUK*Q(lR
zn7M6$UCb0D0-H=Y_@ozfR2F|pyOD)+$%M{Va&ls>%|<`y{3G<99ycR8(ZD;4@=k|d
zx1nPOrARPmMi86c#Qn^1g5RVk00)%LY3fdvDm`_|D|ZP>a4hmnJmTiqc40*eItZ0G
z(Cfxe`6oWB{4L&V2-lf)Dz{MkXQ(A{E}?e1cWU;s-J?xBbGBUgebeTI{+k+LT|P=A
z;GHDn*981}=hBJAGXPX?iXEu)RoZN2kKn)}Yp)=+)%`(=Hk2z^Csu^a+hNSE9<}O4
zW9BhF843QW<{+N^4NZ(+Ohu0L$qp9AhpJ?UbX8~fibx(>f3CRh|ZH~FPW;%L4
z2Jfb`#^2zr=0rNvM5{6`q6x-M;QJ8B$W1lwJwBT6OTa+L|E?*68NnD-d
zqirI@#!DTk6=nvBq1t|F2a57+*JomCoPO&bkNHd&fq@7CoA#=ogI@ER;^g6MTjnNJpU8$17lkcby!fn#Y^cf59qs4;WjW9@I`pu+^=!$XvlzSp
zHl-BP6qCLifc*pwQ8vDfUY0lgjC>>zTLL$6VLQBKH2U4M(&?%A718nspPj%tmUBw+
z#X>LH_#p;`9!I5vv6@cVh1b)~bHTXz;!@s>4omWjec#A;((g=Fq_p{u1|<#I-D{h1
zr%{sZ%zv+3T?)s{c78c|r6Ez1kf5OuRJ<^!_`!;|HxG;mZiSf=CdVqy^)Fpf=
zR6<3YrraF!c1|tIJ#;9sg<)`+=a+cw8*6)$-yV3w_=*W`MB#~zjz6^LYX4eVoTxdI
zc3h_Bc-v+z^z5>e3vEp)brfA?bQ>r1^-8x`-ATBNL)99$&
z;rXG-!IBn08OxyuZoj`hcQ)a@7O5;d=o7$6_hSTJ
z;(^Dr%6p+QhE473G62?L^T{&S2^UB8^~fFHE0@wP^b_T#h%rn7^=(?yQf+N!)<~#c
zB&mh#W%khdZrGJgs@ixb%h?ad2HG&$G8+QXR6zbUk;$(r4F#>F^1>Br!mAfDkRR@D
z!K|#|oQjAh)DlY~3|CG`+4@opGIM
z^i^Z4rXu>d*NVXngpKKI2U_*K}S3_}=T|7q^w`XB`
z2D5mfvT(`vMwh8DGJql?=LI15;DsNI&n^nhYwgI&-{a#V-{;<=cJWiZ5HEkDY(4jD
zc2?xCALMIz@)_iwDG(vRJQ8kP7xC8|N5n
z-mb8AOpEdA->ZPnh_c<&o3Jg+X;AwynF(`1Ihpp9xt|hy
zu7!?dLSahdVg=JpZk#xq{L7i0Y3(N`w+}g
zn}vYJKK$VH`HhCBK)g%Cw8flu&$)8+Ef5m{+5}|bRYsP&t~Jk0TLEENO=yT3nrvyfYKk*n#uYjkyI9wC{A(mO8ae&B%;9#dTh)|_V0}&D>^xO(UZ2e
z2{_|CZ)7#U(3yWf5i9##7`c79OX{6Y8(moRVE~tW6|XopYg$JLlxm|Q3X{o#=h{Lt
zyCavxXR*2;2qGJ^XJ;nKfb^TpVwPUUM{br*(tWeRu{4Id4v!3gY2#K~T^)u_Zer}E
zn_7xjY>yK@ouN|9;O0P^ZRT#CcRfGYf%F#Vs;VRb^a|0p^Z(QZ;v
z_h#9VcRfJ+!d^?N=4N?P&mP&Il_OwCQMpD;0zHfk@ay$}8TVzgO~mUpV_LitM@Q8z
z?9S+w#)-R7Wlo;vsZz9D@#pj>8Cxn}a*?q4(u0!Y^j5C?U$fc+Q?CL`w3ANg?&_1
z?FycB-DhP^mg2^y?@lqA_P>^f{|QRaU~igN=blSkS9CZwMjy&9MHhfv%{2!{eynf`
z$pvnj!j!PJ^$UUrQOmKo@@YFMK}y`iI9Na(F-H2m)K^;G@|^OUI0RWuw$|>Zi>>4v
zq8|c(foEJT-K`qR-DS&5P&JlKeXe6o?f)$qE9Lfsl2!ik}0GeaVk8W1YV42f9!
zrDpRi_q@-CcyuXkqt%*k_=Sc09&?96Tu==56A9)J#}xMwb)PC2fO#x-Caabw>Rn0y
z{HI2_IqLYwp=X|p=?Np~=954+Ml?kfMhR7O0xujiI*!b{uTA~|{_q>bBp
z=-{T8<|tDq3CTI;lW2D@h@1>&cH*BDa_y{)8j?pQ@ST4-bycb_leaSjIqXOg!I-dI
zwNUCuLgX|9CoCb|R&9g{#A6D$#nUq#?A;pr8AdUx?+Mg??0rWBc7w@CmP8$GxdE}e
zzHzq~`$CYEEw*mQui5d*E?e~uhB&}WX3EcR8?CKn>HfFzpYY*7uYx^#J!@o8sI_T#
z<9>7j4!UEiu=RQ98@44ed!uGToSby}kzEY$x!v2ihKXiyj2);!CRiFr>vI6V7wV&~
zpF$-W<*Q*jZKoda1CDyKwXd4AY%8NW?9?a@Yy}T{I
z8l%pzl#*N&hVTtVAK9|*u$h3nx1=6hC?%PgdUH$1
zgU4B#9LvX`-GA_Cqken?Okqp8ZYE~ymacnbL{jExU#!eyp{f&~&7KrUZ(@I$|
z*^;qz>W?cO%fU+}`r^A}yw+(=Jny@=CHlQvYr*sZn~Mq?a}U+deU_vMDx=p%_S
zeq4>UTvg|Ns%zPo!tKDK1jo!MHXs5k!B@$&Iw30U0NMQkIcpzN?DYb2*ymZtS+0tL
z|7ZN81f&h|3Gcxa1-K}FIu}UC&Q5;*yA>^uZA?ny{4)}sFcUL|IrhZMoeaaeLpX1W
z;w-j*w2UV02#G(CdabMIPx^&kQ$y&xwe3xF%dn^Zx=-2>R>1)!wONiAju(G&X}wa&e3M9e@y*jUOnq=Da;aeY3U?)V#0wlC4b>zD
zYg41RpwFSrtQS5)@i*U(!g@ZK3qpF#ekkwhzv36}MIRhhvDIX_{kvF-w-i!URUy&1
zZ(GVLd13Rxa`n}=54^&rT5t6b{-~*ny>~1i9TpVYZ!wNEQFHytZc3QlVJihZ*&r<0
z+pVZ@C%9pIE7QsXE_Wp;lEw)G|JA?Qr?Kw4JQlq%?zBMH%3
zQ6JVx`e*&{{{B6UR&7EDCoSR>Ia4d+4zz1c4JkkrJzYuTQJ&qreUvcDtG1l9xOB(^
zrc~7sn*MO0arcJ>5^dNJY0Dd`dhvNp0zvzsHa0TO=<$99GqoAfRNXiNXf(!*IEnmP
zr8tbeCb^b*$m_VvC6g&*bjtGqCpo-Ox`{)A5lw;yGH&b+sGu3`p#9`TQsPue)fUR<
z&`V+$NVA8gzWIS^yrU#20h!!^9m?LW?#vpgS2M(T!&ts|UtGu)ibm12hjYQH3>Qh9
z&4Gq1i{aI05C~XPmovUh_g2b!EvwQ{JyK_xNk>x&ulaux-hYGOKQD&wmOXCwH|wi#
z>ZA;Hh-sqvZJyfmPTTsim;OTNb>l5w$r>9)Wr+8Y$ptx_kA@kv@KugIc@7s51}<>$GYQ56)Ki`;R>$*#5fm%=a3oHXA{2r
ze(gE^q7@6M#NOKDk?lQ!5v+|OS})<3Q$-XinH=iC%oZ$K*8mR&EYajonfKIB3qJw`
zEh)zGw95_xD1yBg7v#8+sMaF^CW02x=1c30XZN3`1|S3xsHPU&%AtideyTVxW^pmN
zC+CEKwcWLdiPK%WA><$Zk_5~1-n5;YlQ3aqhz90Q0Xyfxt(2@|0?VzodBvU=`;yT2
z97iv%rVlOZAzEh~-1FWqO$aNkyaLq>*<|?mOs(GR3FT392W{moZ;HD&I)GzNjoj|$
z6#h>D!~{G0fG#7m_{NwN;WBo+FBYH&u^ak!z=N*W+uPe4om4A>NYVy$G_k2Ag|NAO
z1wvW{1B!~LG~xZCj+`QiJu+^DH%mVP9T8JGVVNJR;fE6}Y{@+QxZmTcl%iyWfB#
z4>ZRF@(ZG@sG?88UFOlrO7R5%3$!Z0a^39~K+xO1U`7jU^5z(@hy;s>te8_ua9x0Q
zn(l}+Nj+K~g&_``wy#um;Qzq?f&T;l2mTNIANW7;|84Ov|JCpRS8NUz9_W9coCNv_
z?xl52VVa7r#b5F5PRa<1$EH=S_IdUhr^0@&t!&FBRvJ)_Pg&>TFXt
z;Him`;9z20Fs(B_&VW(!)c3M{jzBor(F1Dq}caD#skevw=^xy`W{jSaVH-|RF^
zSxJ<1s$c_lG4y9pCj12Kt805nHipE(fmI(remtK}i2v8umpU5=fE&6Kz!tKfD5{zY
zco!fp1V_e}JZR%cv(4G}(kNtwr>75|O)au*I`|}b#FsjqhIe!NJ-zeaOcKF`RqzgX
zM*JenjN>g8sc(CV9npdUo7l-3T~TbOt`ob-!+y>EHiCg>^;n^+rmplETdVk@A`cVT
zA1`NM{`03FQ?x4Ad8O#s9fGCv7?9O}iuG`+X$PzYMAI#+5>jAk1=DDL4Zw~OY#s>1
zQelFQX}adIQepTSq~Q#Jb(w>Y{qR)gW)Aw04L6*=W|uYVCY8oiUWoVZpBMokVRv`n
z|G@u&{{#OA{tx^g_&@OfZSgOE^Xp%o&t1c5t;L4bTyJavWpxv!`N2~II|QWnuI)Ob
zYv3~hzdJ|?XBxHj0LyR7#yX)CPY)MQMfjp;JB;mJUhwT5L@?^+5I~?-#K5{H_o>s$tlw9%!2JAO%
zwPewi-QXC{!xhKIj#2sjTTl)0}n}@N`7N{W=1DLw7kpe!!Zsa-=pa8*m(NH%XbHdb1Xf#@^W+
z0!Yl(Z&WF*q+t}rJ+X~J$AAkhsNVDQV?(l=i7Q)eikH_fxBDBC;`#gl3*YY74ymO-
zu^WR8?-b)qS)xc+#&MP};#uWZXjqxtS8$~83O9k&BTMF?%87MjbR|K3ytK
zDO-8yV;5vhR^p`+p+(ZmL}s%bYB1U6cA4RPB%6{$xxo07C&85m{tx^g_&@M};Qzq?
jf&T;l-xmM>p8x{@D(Mktb)u`N00000NkvXXu0mjf(?NUb
diff --git a/inst/bsDemo/www/styles/codepen-embed.css b/inst/bsDemo/www/styles/codepen-embed.css
deleted file mode 100644
index 578799c..0000000
--- a/inst/bsDemo/www/styles/codepen-embed.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- codepen.io Embed Theme
- Author: Justin Perry
- Original theme - https://github.com/chriskempson/tomorrow-theme
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #222;
- color: #fff;
- font-family: Menlo, Monaco, 'Andale Mono', 'Lucida Console', 'Courier New', monospace;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.hljs-title {
- color: #777;
-}
-
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .constant,
-.xml .tag .title,
-.xml .pi,
-.xml .doctype,
-.html .doctype {
- color: #ab875d;
-}
-
-.css .value {
- color: #cd6a51;
-}
-
-.css .value .function,
-.css .value .string {
- color: #a67f59;
-}
-
-.css .value .number {
- color: #9b869c;
-}
-
-.css .id,
-.css .class,
-.css-pseudo,
-.css .selector,
-.css .tag {
- color: #dfc48c;
-}
-
-.hljs-number,
-.hljs-preprocessor,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #ab875d;
-}
-
-.ruby .class .title,
-.css .rules .attribute {
- color: #9b869b;
-}
-
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .symbol,
-.xml .cdata {
- color: #8f9c6c;
-}
-
-.css .hexcolor {
- color: #cd6a51;
-}
-
-.function,
-.python .decorator,
-.python .title,
-.ruby .function .title,
-.ruby .title .keyword,
-.perl .sub,
-.javascript .title,
-.coffeescript .title {
- color: #fff;
-}
-
-.hljs-keyword,
-.javascript .function {
- color: #8f9c6c;
-}
-
-.coffeescript .javascript,
-.javascript,
-.javascript .xml,
-.tex .formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .cdata {
- background: transparent;
- opacity: 1;
-}
diff --git a/inst/bsDemo/www/styles/color-brewer.css b/inst/bsDemo/www/styles/color-brewer.css
deleted file mode 100644
index 9b822e0..0000000
--- a/inst/bsDemo/www/styles/color-brewer.css
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-
-Colorbrewer theme
-Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock
-Ported by Fabrício Tavares de Oliveira
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #fff;
- -webkit-text-size-adjust: none;
-}
-
-.hljs,
-.hljs-subst,
-.hljs-tag .hljs-title,
-.nginx .hljs-title {
- color: #000;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-constant,
-.hljs-parent,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.hljs-preprocessor,
-.hljs-pragma,
-.haml .hljs-symbol,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-addition,
-.hljs-flow,
-.hljs-stream,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.tex .hljs-special,
-.erlang_repl .hljs-function_or_atom,
-.asciidoc .hljs-header,
-.markdown .hljs-header,
-.coffeescript .hljs-attribute {
- color: #756bb1;
-}
-
-.smartquote,
-.hljs-comment,
-.hljs-annotation,
-.diff .hljs-header,
-.hljs-chunk,
-.asciidoc .hljs-blockquote,
-.markdown .hljs-blockquote {
- color: #636363;
-}
-
-.hljs-number,
-.hljs-date,
-.hljs-regexp,
-.hljs-literal,
-.hljs-hexcolor,
-.smalltalk .hljs-symbol,
-.smalltalk .hljs-char,
-.go .hljs-constant,
-.hljs-change,
-.lasso .hljs-variable,
-.makefile .hljs-variable,
-.asciidoc .hljs-bullet,
-.markdown .hljs-bullet,
-.asciidoc .hljs-link_url,
-.markdown .hljs-link_url {
- color: #31a354;
-}
-
-.hljs-label,
-.hljs-javadoc,
-.ruby .hljs-string,
-.hljs-decorator,
-.hljs-filter .hljs-argument,
-.hljs-localvars,
-.hljs-array,
-.hljs-attr_selector,
-.hljs-important,
-.hljs-pseudo,
-.hljs-pi,
-.haml .hljs-bullet,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-envvar,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in,
-.hljs-list .hljs-built_in,
-.tex .hljs-formula,
-.erlang_repl .hljs-reserved,
-.hljs-prompt,
-.asciidoc .hljs-link_label,
-.markdown .hljs-link_label,
-.vhdl .hljs-attribute,
-.clojure .hljs-attribute,
-.asciidoc .hljs-attribute,
-.lasso .hljs-attribute,
-.coffeescript .hljs-property,
-.hljs-phony {
- color: #88f;
-}
-
-
-
-.hljs-keyword,
-.hljs-id,
-.hljs-title,
-.hljs-built_in,
-.css .hljs-tag,
-.hljs-javadoctag,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-yardoctag,
-.smalltalk .hljs-class,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.hljs-type,
-.hljs-typename,
-.tex .hljs-command,
-.asciidoc .hljs-strong,
-.markdown .hljs-strong,
-.hljs-request,
-.hljs-status {
- color: #3182bd;
-}
-
-.asciidoc .hljs-emphasis,
-.markdown .hljs-emphasis {
- font-style: italic;
-}
-
-.nginx .hljs-built_in {
- font-weight: normal;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.lasso .markup,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
-
-.css .hljs-attribute,
-.html .hljs-attribute {
- color: #e6550d;
-}
-
-.css .hljs-class,
-.html .hljs-tag,
-.html .hljs-title {
- color: #3182bd;
-}
diff --git a/inst/bsDemo/www/styles/dark.css b/inst/bsDemo/www/styles/dark.css
deleted file mode 100644
index 50d57f4..0000000
--- a/inst/bsDemo/www/styles/dark.css
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-
-Dark style from softwaremaniacs.org (c) Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #444;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.hljs-change,
-.hljs-winutils,
-.hljs-flow,
-.nginx .hljs-title,
-.tex .hljs-special {
- color: white;
-}
-
-.hljs,
-.hljs-subst {
- color: #ddd;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-type,
-.ini .hljs-title,
-.hljs-tag .hljs-value,
-.css .hljs-rules .hljs-value,
-.hljs-preprocessor,
-.hljs-pragma,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.ruby .hljs-class .hljs-parent,
-.hljs-built_in,
-.django .hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-javadoc,
-.ruby .hljs-string,
-.django .hljs-filter .hljs-argument,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-addition,
-.hljs-stream,
-.hljs-envvar,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.hljs-prompt,
-.coffeescript .hljs-attribute {
- color: #d88;
-}
-
-.hljs-comment,
-.hljs-annotation,
-.hljs-decorator,
-.hljs-pi,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.tex .hljs-formula {
- color: #777;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.hljs-title,
-.css .hljs-id,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-type,
-.vbscript .hljs-built_in,
-.rsl .hljs-built_in,
-.smalltalk .hljs-class,
-.diff .hljs-header,
-.hljs-chunk,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.tex .hljs-special,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/default.css b/inst/bsDemo/www/styles/default.css
deleted file mode 100644
index fbc5328..0000000
--- a/inst/bsDemo/www/styles/default.css
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-
-Original style from softwaremaniacs.org (c) Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #f0f0f0;
- -webkit-text-size-adjust: none;
-}
-
-.hljs,
-.hljs-subst,
-.hljs-tag .hljs-title,
-.nginx .hljs-title {
- color: black;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-constant,
-.hljs-parent,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.hljs-preprocessor,
-.hljs-pragma,
-.haml .hljs-symbol,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-addition,
-.hljs-flow,
-.hljs-stream,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.tex .hljs-special,
-.erlang_repl .hljs-function_or_atom,
-.asciidoc .hljs-header,
-.markdown .hljs-header,
-.coffeescript .hljs-attribute {
- color: #800;
-}
-
-.smartquote,
-.hljs-comment,
-.hljs-annotation,
-.diff .hljs-header,
-.hljs-chunk,
-.asciidoc .hljs-blockquote,
-.markdown .hljs-blockquote {
- color: #888;
-}
-
-.hljs-number,
-.hljs-date,
-.hljs-regexp,
-.hljs-literal,
-.hljs-hexcolor,
-.smalltalk .hljs-symbol,
-.smalltalk .hljs-char,
-.go .hljs-constant,
-.hljs-change,
-.lasso .hljs-variable,
-.makefile .hljs-variable,
-.asciidoc .hljs-bullet,
-.markdown .hljs-bullet,
-.asciidoc .hljs-link_url,
-.markdown .hljs-link_url {
- color: #080;
-}
-
-.hljs-label,
-.hljs-javadoc,
-.ruby .hljs-string,
-.hljs-decorator,
-.hljs-filter .hljs-argument,
-.hljs-localvars,
-.hljs-array,
-.hljs-attr_selector,
-.hljs-important,
-.hljs-pseudo,
-.hljs-pi,
-.haml .hljs-bullet,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-envvar,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in,
-.tex .hljs-formula,
-.erlang_repl .hljs-reserved,
-.hljs-prompt,
-.asciidoc .hljs-link_label,
-.markdown .hljs-link_label,
-.vhdl .hljs-attribute,
-.clojure .hljs-attribute,
-.asciidoc .hljs-attribute,
-.lasso .hljs-attribute,
-.coffeescript .hljs-property,
-.hljs-phony {
- color: #88f;
-}
-
-.hljs-keyword,
-.hljs-id,
-.hljs-title,
-.hljs-built_in,
-.css .hljs-tag,
-.hljs-javadoctag,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-yardoctag,
-.smalltalk .hljs-class,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.hljs-type,
-.hljs-typename,
-.tex .hljs-command,
-.asciidoc .hljs-strong,
-.markdown .hljs-strong,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
-}
-
-.asciidoc .hljs-emphasis,
-.markdown .hljs-emphasis {
- font-style: italic;
-}
-
-.nginx .hljs-built_in {
- font-weight: normal;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.lasso .markup,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/docco.css b/inst/bsDemo/www/styles/docco.css
deleted file mode 100644
index b4ad1e5..0000000
--- a/inst/bsDemo/www/styles/docco.css
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
-Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #000;
- background: #f8f8ff;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.diff .hljs-header,
-.hljs-javadoc {
- color: #408080;
- font-style: italic;
-}
-
-.hljs-keyword,
-.assignment,
-.hljs-literal,
-.css .rule .hljs-keyword,
-.hljs-winutils,
-.javascript .hljs-title,
-.lisp .hljs-title,
-.hljs-subst {
- color: #954121;
-}
-
-.hljs-number,
-.hljs-hexcolor {
- color: #40a070;
-}
-
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.tex .hljs-formula {
- color: #219161;
-}
-
-.hljs-title,
-.hljs-id {
- color: #19469d;
-}
-.hljs-params {
- color: #00f;
-}
-
-.javascript .hljs-title,
-.lisp .hljs-title,
-.hljs-subst {
- font-weight: normal;
-}
-
-.hljs-class .hljs-title,
-.haskell .hljs-label,
-.tex .hljs-command {
- color: #458;
- font-weight: bold;
-}
-
-.hljs-tag,
-.hljs-tag .hljs-title,
-.hljs-rules .hljs-property,
-.django .hljs-tag .hljs-keyword {
- color: #000080;
- font-weight: normal;
-}
-
-.hljs-attribute,
-.hljs-variable,
-.instancevar,
-.lisp .hljs-body {
- color: #008080;
-}
-
-.hljs-regexp {
- color: #b68;
-}
-
-.hljs-class {
- color: #458;
- font-weight: bold;
-}
-
-.hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.ruby .hljs-symbol .hljs-keyword,
-.ruby .hljs-symbol .keymethods,
-.lisp .hljs-keyword,
-.tex .hljs-special,
-.input_number {
- color: #990073;
-}
-
-.builtin,
-.constructor,
-.hljs-built_in,
-.lisp .hljs-title {
- color: #0086b3;
-}
-
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-pi,
-.hljs-doctype,
-.hljs-shebang,
-.hljs-cdata {
- color: #999;
- font-weight: bold;
-}
-
-.hljs-deletion {
- background: #fdd;
-}
-
-.hljs-addition {
- background: #dfd;
-}
-
-.diff .hljs-change {
- background: #0086b3;
-}
-
-.hljs-chunk {
- color: #aaa;
-}
-
-.tex .hljs-formula {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/far.css b/inst/bsDemo/www/styles/far.css
deleted file mode 100644
index 323cc2d..0000000
--- a/inst/bsDemo/www/styles/far.css
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-
-FAR Style (c) MajestiC
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #000080;
- -webkit-text-size-adjust: none;
-}
-
-.hljs,
-.hljs-subst {
- color: #0ff;
-}
-
-.hljs-string,
-.ruby .hljs-string,
-.haskell .hljs-type,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.hljs-rules .hljs-value .hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-built_in,
-.django .hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-addition,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.coffeescript .hljs-attribute {
- color: #ff0;
-}
-
-.hljs-keyword,
-.css .hljs-id,
-.hljs-title,
-.hljs-type,
-.vbscript .hljs-built_in,
-.rsl .hljs-built_in,
-.smalltalk .hljs-class,
-.xml .hljs-tag .hljs-title,
-.hljs-winutils,
-.hljs-flow,
-.hljs-change,
-.hljs-envvar,
-.bash .hljs-variable,
-.tex .hljs-special {
- color: #fff;
-}
-
-.hljs-comment,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-javadoc,
-.hljs-annotation,
-.hljs-deletion,
-.apache .hljs-sqbracket,
-.tex .hljs-formula {
- color: #888;
-}
-
-.hljs-number,
-.hljs-date,
-.hljs-regexp,
-.hljs-literal,
-.smalltalk .hljs-symbol,
-.smalltalk .hljs-char,
-.clojure .hljs-attribute {
- color: #0f0;
-}
-
-.hljs-decorator,
-.django .hljs-filter .hljs-argument,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.xml .hljs-pi,
-.diff .hljs-header,
-.hljs-chunk,
-.hljs-shebang,
-.nginx .hljs-built_in,
-.hljs-prompt {
- color: #008080;
-}
-
-.hljs-keyword,
-.css .hljs-id,
-.hljs-title,
-.hljs-type,
-.vbscript .hljs-built_in,
-.rsl .hljs-built_in,
-.smalltalk .hljs-class,
-.hljs-winutils,
-.hljs-flow,
-.apache .hljs-tag,
-.nginx .hljs-built_in,
-.tex .hljs-command,
-.tex .hljs-special,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
-}
diff --git a/inst/bsDemo/www/styles/foundation.css b/inst/bsDemo/www/styles/foundation.css
deleted file mode 100644
index 5407dc2..0000000
--- a/inst/bsDemo/www/styles/foundation.css
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
-Description: Foundation 4 docs style for highlight.js
-Author: Dan Allen
-Website: http://foundation.zurb.com/docs/
-Version: 1.0
-Date: 2013-04-02
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #eee;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-header,
-.hljs-decorator,
-.hljs-annotation {
- color: #000077;
-}
-
-.hljs-horizontal_rule,
-.hljs-link_url,
-.hljs-emphasis,
-.hljs-attribute {
- color: #070;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-link_label,
-.hljs-strong,
-.hljs-value,
-.hljs-string,
-.scss .hljs-value .hljs-string {
- color: #d14;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-blockquote,
-.hljs-comment {
- color: #998;
- font-style: italic;
-}
-
-.asciidoc .hljs-title,
-.hljs-function .hljs-title {
- color: #900;
-}
-
-.hljs-class {
- color: #458;
-}
-
-.hljs-id,
-.hljs-pseudo,
-.hljs-constant,
-.hljs-hexcolor {
- color: teal;
-}
-
-.hljs-variable {
- color: #336699;
-}
-
-.hljs-bullet,
-.hljs-javadoc {
- color: #997700;
-}
-
-.hljs-pi,
-.hljs-doctype {
- color: #3344bb;
-}
-
-.hljs-code,
-.hljs-number {
- color: #099;
-}
-
-.hljs-important {
- color: #f00;
-}
-
-.smartquote,
-.hljs-label {
- color: #970;
-}
-
-.hljs-preprocessor,
-.hljs-pragma {
- color: #579;
-}
-
-.hljs-reserved,
-.hljs-keyword,
-.scss .hljs-value {
- color: #000;
-}
-
-.hljs-regexp {
- background-color: #fff0ff;
- color: #880088;
-}
-
-.hljs-symbol {
- color: #990073;
-}
-
-.hljs-symbol .hljs-string {
- color: #a60;
-}
-
-.hljs-tag {
- color: #007700;
-}
-
-.hljs-at_rule,
-.hljs-at_rule .hljs-keyword {
- color: #088;
-}
-
-.hljs-at_rule .hljs-preprocessor {
- color: #808;
-}
-
-.scss .hljs-tag,
-.scss .hljs-attribute {
- color: #339;
-}
diff --git a/inst/bsDemo/www/styles/github.css b/inst/bsDemo/www/styles/github.css
deleted file mode 100644
index 9b4f3aa..0000000
--- a/inst/bsDemo/www/styles/github.css
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-
-github.com style (c) Vasily Polovnyov
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #333;
- background: #f8f8f8;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.diff .hljs-header,
-.hljs-javadoc {
- color: #998;
- font-style: italic;
-}
-
-.hljs-keyword,
-.css .rule .hljs-keyword,
-.hljs-winutils,
-.nginx .hljs-title,
-.hljs-subst,
-.hljs-request,
-.hljs-status {
- color: #333;
- font-weight: bold;
-}
-
-.hljs-number,
-.hljs-hexcolor,
-.ruby .hljs-constant {
- color: #008080;
-}
-
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.tex .hljs-formula {
- color: #d14;
-}
-
-.hljs-title,
-.hljs-id,
-.scss .hljs-preprocessor {
- color: #900;
- font-weight: bold;
-}
-
-.hljs-list .hljs-keyword,
-.hljs-subst {
- font-weight: normal;
-}
-
-.hljs-class .hljs-title,
-.hljs-type,
-.vhdl .hljs-literal,
-.tex .hljs-command {
- color: #458;
- font-weight: bold;
-}
-
-.hljs-tag,
-.hljs-tag .hljs-title,
-.hljs-rules .hljs-property,
-.django .hljs-tag .hljs-keyword {
- color: #000080;
- font-weight: normal;
-}
-
-.hljs-attribute,
-.hljs-variable,
-.lisp .hljs-body {
- color: #008080;
-}
-
-.hljs-regexp {
- color: #009926;
-}
-
-.hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.lisp .hljs-keyword,
-.clojure .hljs-keyword,
-.scheme .hljs-keyword,
-.tex .hljs-special,
-.hljs-prompt {
- color: #990073;
-}
-
-.hljs-built_in {
- color: #0086b3;
-}
-
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-pi,
-.hljs-doctype,
-.hljs-shebang,
-.hljs-cdata {
- color: #999;
- font-weight: bold;
-}
-
-.hljs-deletion {
- background: #fdd;
-}
-
-.hljs-addition {
- background: #dfd;
-}
-
-.diff .hljs-change {
- background: #0086b3;
-}
-
-.hljs-chunk {
- color: #aaa;
-}
diff --git a/inst/bsDemo/www/styles/googlecode.css b/inst/bsDemo/www/styles/googlecode.css
deleted file mode 100644
index 84be5f2..0000000
--- a/inst/bsDemo/www/styles/googlecode.css
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
-
-Google Code style (c) Aahan Krish
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: white;
- color: black;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.hljs-javadoc {
- color: #800;
-}
-
-.hljs-keyword,
-.method,
-.hljs-list .hljs-keyword,
-.nginx .hljs-title,
-.hljs-tag .hljs-title,
-.setting .hljs-value,
-.hljs-winutils,
-.tex .hljs-command,
-.http .hljs-title,
-.hljs-request,
-.hljs-status {
- color: #008;
-}
-
-.hljs-envvar,
-.tex .hljs-special {
- color: #660;
-}
-
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-cdata,
-.hljs-filter .hljs-argument,
-.hljs-attr_selector,
-.apache .hljs-cbracket,
-.hljs-date,
-.hljs-regexp,
-.coffeescript .hljs-attribute {
- color: #080;
-}
-
-.hljs-sub .hljs-identifier,
-.hljs-pi,
-.hljs-tag,
-.hljs-tag .hljs-keyword,
-.hljs-decorator,
-.ini .hljs-title,
-.hljs-shebang,
-.hljs-prompt,
-.hljs-hexcolor,
-.hljs-rules .hljs-value,
-.hljs-literal,
-.hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-number,
-.css .hljs-function,
-.clojure .hljs-attribute {
- color: #066;
-}
-
-.hljs-class .hljs-title,
-.smalltalk .hljs-class,
-.hljs-javadoctag,
-.hljs-yardoctag,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-type,
-.hljs-typename,
-.hljs-tag .hljs-attribute,
-.hljs-doctype,
-.hljs-class .hljs-id,
-.hljs-built_in,
-.setting,
-.hljs-params,
-.hljs-variable {
- color: #606;
-}
-
-.css .hljs-tag,
-.hljs-rules .hljs-property,
-.hljs-pseudo,
-.hljs-subst {
- color: #000;
-}
-
-.css .hljs-class,
-.css .hljs-id {
- color: #9b703f;
-}
-
-.hljs-value .hljs-important {
- color: #ff7700;
- font-weight: bold;
-}
-
-.hljs-rules .hljs-keyword {
- color: #c5af75;
-}
-
-.hljs-annotation,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in {
- color: #9b859d;
-}
-
-.hljs-preprocessor,
-.hljs-preprocessor *,
-.hljs-pragma {
- color: #444;
-}
-
-.tex .hljs-formula {
- background-color: #eee;
- font-style: italic;
-}
-
-.diff .hljs-header,
-.hljs-chunk {
- color: #808080;
- font-weight: bold;
-}
-
-.diff .hljs-change {
- background-color: #bccff9;
-}
-
-.hljs-addition {
- background-color: #baeeba;
-}
-
-.hljs-deletion {
- background-color: #ffc8bd;
-}
-
-.hljs-comment .hljs-yardoctag {
- font-weight: bold;
-}
diff --git a/inst/bsDemo/www/styles/hybrid.css b/inst/bsDemo/www/styles/hybrid.css
deleted file mode 100644
index 6149fd3..0000000
--- a/inst/bsDemo/www/styles/hybrid.css
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
-
-vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
-
-*/
-
-/*background color*/
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #1d1f21;
- -webkit-text-size-adjust: none;
-}
-
-/*selection color*/
-.hljs::selection,
-.hljs span::selection {
- background: #373b41;
-}
-.hljs::-moz-selection,
-.hljs span::-moz-selection {
- background: #373b41;
-}
-
-/*foreground color*/
-.hljs,
-.hljs-setting .hljs-value,
-.hljs-expression .hljs-variable,
-.hljs-expression .hljs-begin-block,
-.hljs-expression .hljs-end-block,
-.hljs-class .hljs-params,
-.hljs-function .hljs-params,
-.hljs-at_rule .hljs-preprocessor {
- color: #c5c8c6;
-}
-
-/*color: fg_yellow*/
-.hljs-title,
-.hljs-function .hljs-title,
-.hljs-keyword .hljs-common,
-.hljs-class .hljs-title,
-.hljs-decorator,
-.hljs-tag .hljs-title,
-.hljs-header,
-.hljs-sub,
-.hljs-function {
- color: #f0c674;
-}
-
-/*color: fg_comment*/
-.hljs-comment,
-.hljs-javadoc,
-.hljs-output .hljs-value,
-.hljs-pi,
-.hljs-shebang,
-.hljs-doctype {
- color: #707880;
-}
-
-/*color: fg_red*/
-.hljs-number,
-.hljs-symbol,
-.hljs-literal,
-.hljs-deletion,
-.hljs-link_url,
-.hljs-symbol .hljs-string,
-.hljs-argument,
-.hljs-hexcolor,
-.hljs-input .hljs-prompt,
-.hljs-char {
- color: #cc6666
-}
-
-/*color: fg_green*/
-.hljs-string,
-.hljs-special,
-.hljs-javadoctag,
-.hljs-addition,
-.hljs-important,
-.hljs-tag .hljs-value,
-.hljs-at.rule .hljs-keyword,
-.hljs-regexp,
-.hljs-attr_selector {
- color: #b5bd68;
-}
-
-/*color: fg_purple*/
-.hljs-variable,
-.hljs-property,
-.hljs-envar,
-.hljs-code,
-.hljs-expression,
-.hljs-localvars,
-.hljs-id,
-.hljs-variable .hljs-filter,
-.hljs-variable .hljs-filter .hljs-keyword,
-.hljs-template_tag .hljs-filter .hljs-keyword {
- color: #b294bb;
-}
-
-/*color: fg_blue*/
-.hljs-statement,
-.hljs-label,
-.hljs-keyword,
-.hljs-xmlDocTag,
-.hljs-function .hljs-keyword,
-.hljs-chunk,
-.hljs-cdata,
-.hljs-link_label,
-.hljs-bullet,
-.hljs-class .hljs-keyword,
-.hljs-smartquote,
-.hljs-method,
-.hljs-list .hljs-title,
-.hljs-tag {
- color: #81a2be;
-}
-
-/*color: fg_aqua*/
-.hljs-pseudo,
-.hljs-exception,
-.hljs-annotation,
-.hljs-subst,
-.hljs-change,
-.hljs-cbracket,
-.hljs-operator,
-.hljs-horizontal_rule,
-.hljs-preprocessor .hljs-keyword,
-.hljs-typedef,
-.hljs-template_tag,
-.hljs-variable,
-.hljs-variable .hljs-filter .hljs-argument,
-.hljs-at_rule,
-.hljs-at_rule .hljs-string,
-.hljs-at_rule .hljs-keyword {
- color: #8abeb7;
-}
-
-
-/*color: fg_orange*/
-.hljs-type,
-.hljs-typename,
-.hljs-inheritance .hljs-parent,
-.hljs-constant,
-.hljs-built_in,
-.hljs-setting,
-.hljs-structure,
-.hljs-link_reference,
-.hljs-attribute,
-.hljs-blockquote,
-.hljs-quoted,
-.hljs-class,
-.hljs-header {
- color: #de935f;
-}
-
-.hljs-emphasis
-{
- font-style: italic;
-}
-
-.hljs-strong
-{
- font-weight: bold;
-}
-
-
-
-
diff --git a/inst/bsDemo/www/styles/idea.css b/inst/bsDemo/www/styles/idea.css
deleted file mode 100644
index a3f01fc..0000000
--- a/inst/bsDemo/www/styles/idea.css
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-
-Intellij Idea-like styling (c) Vasily Polovnyov
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #000;
- background: #fff;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-subst,
-.hljs-title,
-.json .hljs-value {
- font-weight: normal;
- color: #000;
-}
-
-.hljs-comment,
-.hljs-javadoc,
-.diff .hljs-header {
- color: #808080;
- font-style: italic;
-}
-
-.hljs-annotation,
-.hljs-decorator,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-doctype,
-.hljs-pi,
-.hljs-chunk,
-.hljs-shebang,
-.apache .hljs-cbracket,
-.hljs-prompt,
-.http .hljs-title {
- color: #808000;
-}
-
-.hljs-tag,
-.hljs-pi {
- background: #efefef;
-}
-
-.hljs-tag .hljs-title,
-.hljs-id,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-literal,
-.hljs-keyword,
-.hljs-hexcolor,
-.css .hljs-function,
-.ini .hljs-title,
-.css .hljs-class,
-.hljs-list .hljs-keyword,
-.nginx .hljs-title,
-.tex .hljs-command,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
- color: #000080;
-}
-
-.hljs-attribute,
-.hljs-rules .hljs-keyword,
-.hljs-number,
-.hljs-date,
-.hljs-regexp,
-.tex .hljs-special {
- font-weight: bold;
- color: #0000ff;
-}
-
-.hljs-number,
-.hljs-regexp {
- font-weight: normal;
-}
-
-.hljs-string,
-.hljs-value,
-.hljs-filter .hljs-argument,
-.css .hljs-function .hljs-params,
-.apache .hljs-tag {
- color: #008000;
- font-weight: bold;
-}
-
-.hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-char,
-.tex .hljs-formula {
- color: #000;
- background: #d0eded;
- font-style: italic;
-}
-
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-yardoctag,
-.hljs-javadoctag {
- text-decoration: underline;
-}
-
-.hljs-variable,
-.hljs-envvar,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in {
- color: #660e7a;
-}
-
-.hljs-addition {
- background: #baeeba;
-}
-
-.hljs-deletion {
- background: #ffc8bd;
-}
-
-.diff .hljs-change {
- background: #bccff9;
-}
diff --git a/inst/bsDemo/www/styles/ir_black.css b/inst/bsDemo/www/styles/ir_black.css
deleted file mode 100644
index 2fb5475..0000000
--- a/inst/bsDemo/www/styles/ir_black.css
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- IR_Black style (c) Vasily Mikhailitchenko
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #000;
- color: #f8f8f8;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-shebang,
-.hljs-comment,
-.hljs-javadoc {
- color: #7c7c7c;
-}
-
-.hljs-keyword,
-.hljs-tag,
-.tex .hljs-command,
-.hljs-request,
-.hljs-status,
-.clojure .hljs-attribute {
- color: #96cbfe;
-}
-
-.hljs-sub .hljs-keyword,
-.method,
-.hljs-list .hljs-title,
-.nginx .hljs-title {
- color: #ffffb6;
-}
-
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-cdata,
-.hljs-filter .hljs-argument,
-.hljs-attr_selector,
-.apache .hljs-cbracket,
-.hljs-date,
-.coffeescript .hljs-attribute {
- color: #a8ff60;
-}
-
-.hljs-subst {
- color: #daefa3;
-}
-
-.hljs-regexp {
- color: #e9c062;
-}
-
-.hljs-title,
-.hljs-sub .hljs-identifier,
-.hljs-pi,
-.hljs-decorator,
-.tex .hljs-special,
-.hljs-type,
-.hljs-constant,
-.smalltalk .hljs-class,
-.hljs-javadoctag,
-.hljs-yardoctag,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.nginx .hljs-built_in {
- color: #ffffb6;
-}
-
-.hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-number,
-.hljs-variable,
-.vbscript,
-.hljs-literal {
- color: #c6c5fe;
-}
-
-.css .hljs-tag {
- color: #96cbfe;
-}
-
-.css .hljs-rules .hljs-property,
-.css .hljs-id {
- color: #ffffb6;
-}
-
-.css .hljs-class {
- color: #fff;
-}
-
-.hljs-hexcolor {
- color: #c6c5fe;
-}
-
-.hljs-number {
- color:#ff73fd;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.7;
-}
diff --git a/inst/bsDemo/www/styles/kimbie.dark.css b/inst/bsDemo/www/styles/kimbie.dark.css
deleted file mode 100644
index 08e941a..0000000
--- a/inst/bsDemo/www/styles/kimbie.dark.css
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Name: Kimbie (dark)
- Author: Jan T. Sott
- License: Creative Commons Attribution-ShareAlike 4.0 Unported License
- URL: https://github.com/idleberg/Kimbie-highlight.js
-*/
-
-/* Kimbie Comment */
-.hljs-comment,
-.hljs-title {
- color: #d6baad;
-}
-
-/* Kimbie Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #dc3958;
-}
-
-/* Kimbie Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #f79a32;
-}
-
-/* Kimbie Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #f06431;
-}
-
-/* Kimbie Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #889b4a;
-}
-
-/* Kimbie Aqua */
-.css .hljs-hexcolor {
- color: #088649;
-}
-
-/* Kimbie Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #8ab1b0;
-}
-
-/* Kimbie Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #98676a;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #221a0f;
- color: #d3af86;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/kimbie.light.css b/inst/bsDemo/www/styles/kimbie.light.css
deleted file mode 100644
index 27576f4..0000000
--- a/inst/bsDemo/www/styles/kimbie.light.css
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Name: Kimbie (light)
- Author: Jan T. Sott
- License: Creative Commons Attribution-ShareAlike 4.0 Unported License
- URL: https://github.com/idleberg/Kimbie-highlight.js
-*/
-
-/* Kimbie Comment */
-.hljs-comment,
-.hljs-title {
- color: #a57a4c;
-}
-
-/* Kimbie Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #dc3958;
-}
-
-/* Kimbie Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #f79a32;
-}
-
-/* Kimbie Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #f06431;
-}
-
-/* Kimbie Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #889b4a;
-}
-
-/* Kimbie Aqua */
-.css .hljs-hexcolor {
- color: #088649;
-}
-
-/* Kimbie Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #8ab1b0;
-}
-
-/* Kimbie Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #98676a;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #fbebd4;
- color: #84613d;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/magula.css b/inst/bsDemo/www/styles/magula.css
deleted file mode 100644
index 9476fa1..0000000
--- a/inst/bsDemo/www/styles/magula.css
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-Description: Magula style for highligh.js
-Author: Ruslan Keba
-Website: http://rukeba.com/
-Version: 1.0
-Date: 2009-01-03
-Music: Aphex Twin / Xtal
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background-color: #f4f4f4;
- -webkit-text-size-adjust: none;
-}
-
-.hljs,
-.hljs-subst {
- color: black;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-parent,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.hljs-preprocessor,
-.hljs-pragma,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-addition,
-.hljs-flow,
-.hljs-stream,
-.bash .hljs-variable,
-.apache .hljs-cbracket,
-.coffeescript .hljs-attribute {
- color: #050;
-}
-
-.hljs-comment,
-.hljs-annotation,
-.diff .hljs-header,
-.hljs-chunk {
- color: #777;
-}
-
-.hljs-number,
-.hljs-date,
-.hljs-regexp,
-.hljs-literal,
-.smalltalk .hljs-symbol,
-.smalltalk .hljs-char,
-.hljs-change,
-.tex .hljs-special {
- color: #800;
-}
-
-.hljs-label,
-.hljs-javadoc,
-.ruby .hljs-string,
-.hljs-decorator,
-.hljs-filter .hljs-argument,
-.hljs-localvars,
-.hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-pi,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-envvar,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in,
-.tex .hljs-formula,
-.hljs-prompt,
-.clojure .hljs-attribute {
- color: #00e;
-}
-
-.hljs-keyword,
-.hljs-id,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-title,
-.hljs-built_in,
-.smalltalk .hljs-class,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.xml .hljs-tag,
-.tex .hljs-command,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
- color: navy;
-}
-
-.nginx .hljs-built_in {
- font-weight: normal;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
-
-/* --- */
-.apache .hljs-tag {
- font-weight: bold;
- color: blue;
-}
-
diff --git a/inst/bsDemo/www/styles/mono-blue.css b/inst/bsDemo/www/styles/mono-blue.css
deleted file mode 100644
index 6411dec..0000000
--- a/inst/bsDemo/www/styles/mono-blue.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- Five-color theme from a single blue hue.
-*/
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #eaeef3;
- -webkit-text-size-adjust: none;
-}
-
-.hljs,
-.hljs-list .hljs-built_in {
- color: #00193a;
-}
-
-.hljs-keyword,
-.hljs-title,
-.hljs-important,
-.hljs-request,
-.hljs-header,
-.hljs-javadoctag {
- font-weight: bold;
-}
-
-.hljs-comment,
-.hljs-chunk {
- color: #738191;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-parent,
-.hljs-built_in,
-.hljs-literal,
-.hljs-filename,
-.hljs-value,
-.hljs-addition,
-.hljs-tag,
-.hljs-argument,
-.hljs-link_label,
-.hljs-blockquote,
-.hljs-header {
- color: #0048ab;
-}
-
-.hljs-decorator,
-.hljs-prompt,
-.hljs-yardoctag,
-.hljs-subst,
-.hljs-symbol,
-.hljs-doctype,
-.hljs-regexp,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-pi,
-.hljs-attribute,
-.hljs-attr_selector,
-.hljs-javadoc,
-.hljs-xmlDocTag,
-.hljs-deletion,
-.hljs-shebang,
-.hljs-string .hljs-variable,
-.hljs-link_url,
-.hljs-bullet,
-.hljs-sqbracket,
-.hljs-phony {
- color: #4c81c9;
-}
diff --git a/inst/bsDemo/www/styles/monokai.css b/inst/bsDemo/www/styles/monokai.css
deleted file mode 100644
index 010787f..0000000
--- a/inst/bsDemo/www/styles/monokai.css
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-Monokai style - ported by Luigi Maselli - http://grigio.org
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #272822;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-tag,
-.hljs-tag .hljs-title,
-.hljs-keyword,
-.hljs-literal,
-.hljs-strong,
-.hljs-change,
-.hljs-winutils,
-.hljs-flow,
-.nginx .hljs-title,
-.tex .hljs-special {
- color: #f92672;
-}
-
-.hljs {
- color: #ddd;
-}
-
-.hljs .hljs-constant,
-.asciidoc .hljs-code,
-.markdown .hljs-code {
- color: #66d9ef;
-}
-
-.hljs-code,
-.hljs-class .hljs-title,
-.hljs-header {
- color: white;
-}
-
-.hljs-link_label,
-.hljs-attribute,
-.hljs-symbol,
-.hljs-symbol .hljs-string,
-.hljs-value,
-.hljs-regexp {
- color: #bf79db;
-}
-
-.hljs-link_url,
-.hljs-tag .hljs-value,
-.hljs-string,
-.hljs-bullet,
-.hljs-subst,
-.hljs-title,
-.hljs-emphasis,
-.hljs-type,
-.hljs-preprocessor,
-.hljs-pragma,
-.ruby .hljs-class .hljs-parent,
-.hljs-built_in,
-.django .hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-javadoc,
-.django .hljs-filter .hljs-argument,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-addition,
-.hljs-stream,
-.hljs-envvar,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.hljs-prompt {
- color: #a6e22e;
-}
-
-.hljs-comment,
-.hljs-annotation,
-.smartquote,
-.hljs-blockquote,
-.hljs-horizontal_rule,
-.hljs-decorator,
-.hljs-pi,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.tex .hljs-formula {
- color: #75715e;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.css .hljs-id,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-title,
-.hljs-header,
-.hljs-type,
-.vbscript .hljs-built_in,
-.rsl .hljs-built_in,
-.smalltalk .hljs-class,
-.diff .hljs-header,
-.hljs-chunk,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.tex .hljs-special,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/monokai_sublime.css b/inst/bsDemo/www/styles/monokai_sublime.css
deleted file mode 100644
index 8f23994..0000000
--- a/inst/bsDemo/www/styles/monokai_sublime.css
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-
-Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #23241f;
- -webkit-text-size-adjust: none;
-}
-
-.hljs,
-.hljs-tag,
-.css .hljs-rules,
-.css .hljs-value,
-.aspectj .hljs-function,
-.css .hljs-function
-.hljs-preprocessor,
-.hljs-pragma {
- color: #f8f8f2;
-}
-
-.hljs-strongemphasis,
-.hljs-strong,
-.hljs-emphasis {
- color: #a8a8a2;
-}
-
-.hljs-bullet,
-.hljs-blockquote,
-.hljs-horizontal_rule,
-.hljs-number,
-.hljs-regexp,
-.alias .hljs-keyword,
-.hljs-literal,
-.hljs-hexcolor {
- color: #ae81ff;
-}
-
-.hljs-tag .hljs-value,
-.hljs-code,
-.hljs-title,
-.css .hljs-class,
-.hljs-class .hljs-title:last-child {
- color: #a6e22e;
-}
-
-.hljs-link_url {
- font-size: 80%;
-}
-
-.hljs-strong,
-.hljs-strongemphasis {
- font-weight: bold;
-}
-
-.hljs-emphasis,
-.hljs-strongemphasis,
-.hljs-class .hljs-title:last-child,
-.hljs-typename {
- font-style: italic;
-}
-
-.hljs-keyword,
-.ruby .hljs-class .hljs-keyword:first-child,
-.ruby .hljs-function .hljs-keyword,
-.hljs-function,
-.hljs-change,
-.hljs-winutils,
-.hljs-flow,
-.nginx .hljs-title,
-.tex .hljs-special,
-.hljs-header,
-.hljs-attribute,
-.hljs-symbol,
-.hljs-symbol .hljs-string,
-.hljs-tag .hljs-title,
-.hljs-value,
-.alias .hljs-keyword:first-child,
-.css .hljs-tag,
-.css .unit,
-.css .hljs-important {
- color: #f92672;
-}
-
-.hljs-function .hljs-keyword,
-.hljs-class .hljs-keyword:first-child,
-.hljs-aspect .hljs-keyword:first-child,
-.hljs-constant,
-.hljs-typename,
-.css .hljs-attribute {
- color: #66d9ef;
-}
-
-.hljs-variable,
-.hljs-params,
-.hljs-class .hljs-title,
-.hljs-aspect .hljs-title {
- color: #f8f8f2;
-}
-
-.hljs-string,
-.css .hljs-id,
-.hljs-subst,
-.hljs-type,
-.ruby .hljs-class .hljs-parent,
-.hljs-built_in,
-.django .hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.django .hljs-filter .hljs-argument,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-addition,
-.hljs-stream,
-.hljs-envvar,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.hljs-prompt,
-.hljs-link_label,
-.hljs-link_url {
- color: #e6db74;
-}
-
-.hljs-comment,
-.hljs-javadoc,
-.hljs-annotation,
-.hljs-decorator,
-.hljs-pi,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.tex .hljs-formula {
- color: #75715e;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata,
-.xml .php,
-.php .xml {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/obsidian.css b/inst/bsDemo/www/styles/obsidian.css
deleted file mode 100644
index 835d746..0000000
--- a/inst/bsDemo/www/styles/obsidian.css
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * Obsidian style
- * ported by Alexander Marenin (http://github.com/ioncreature)
- */
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #282b2e;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.hljs-change,
-.hljs-winutils,
-.hljs-flow,
-.nginx .hljs-title,
-.css .hljs-id,
-.tex .hljs-special {
- color: #93c763;
-}
-
-.hljs-number {
- color: #ffcd22;
-}
-
-.hljs {
- color: #e0e2e4;
-}
-
-.css .hljs-tag,
-.css .hljs-pseudo {
- color: #d0d2b5;
-}
-
-.hljs-attribute,
-.hljs .hljs-constant {
- color: #668bb0;
-}
-
-.xml .hljs-attribute {
- color: #b3b689;
-}
-
-.xml .hljs-tag .hljs-value {
- color: #e8e2b7;
-}
-
-.hljs-code,
-.hljs-class .hljs-title,
-.hljs-header {
- color: white;
-}
-
-.hljs-class,
-.hljs-hexcolor {
- color: #93c763;
-}
-
-.hljs-regexp {
- color: #d39745;
-}
-
-.hljs-at_rule,
-.hljs-at_rule .hljs-keyword {
- color: #a082bd;
-}
-
-.hljs-doctype {
- color: #557182;
-}
-
-.hljs-link_url,
-.hljs-tag,
-.hljs-tag .hljs-title,
-.hljs-bullet,
-.hljs-subst,
-.hljs-emphasis,
-.hljs-type,
-.hljs-preprocessor,
-.hljs-pragma,
-.ruby .hljs-class .hljs-parent,
-.hljs-built_in,
-.django .hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-javadoc,
-.django .hljs-filter .hljs-argument,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-addition,
-.hljs-stream,
-.hljs-envvar,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.tex .hljs-command,
-.hljs-prompt {
- color: #8cbbad;
-}
-
-.hljs-string {
- color: #ec7600;
-}
-
-.hljs-comment,
-.hljs-annotation,
-.hljs-blockquote,
-.hljs-horizontal_rule,
-.hljs-decorator,
-.hljs-pi,
-.hljs-deletion,
-.hljs-shebang,
-.apache .hljs-sqbracket,
-.tex .hljs-formula {
- color: #818e96;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.css .hljs-id,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-title,
-.hljs-header,
-.hljs-type,
-.vbscript .hljs-built_in,
-.rsl .hljs-built_in,
-.smalltalk .hljs-class,
-.diff .hljs-header,
-.hljs-chunk,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.tex .hljs-special,
-.hljs-request,
-.hljs-at_rule .hljs-keyword,
-.hljs-status {
- font-weight: bold;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/paraiso.dark.css b/inst/bsDemo/www/styles/paraiso.dark.css
deleted file mode 100644
index 4a803d4..0000000
--- a/inst/bsDemo/www/styles/paraiso.dark.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- Paraíso (dark)
- Created by Jan T. Sott (http://github.com/idleberg)
- Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
-*/
-
-/* Paraíso Comment */
-.hljs-comment,
-.hljs-title {
- color: #8d8687;
-}
-
-/* Paraíso Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #ef6155;
-}
-
-/* Paraíso Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #f99b15;
-}
-
-/* Paraíso Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #fec418;
-}
-
-/* Paraíso Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #48b685;
-}
-
-/* Paraíso Aqua */
-.css .hljs-hexcolor {
- color: #5bc4bf;
-}
-
-/* Paraíso Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #06b6ef;
-}
-
-/* Paraíso Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #815ba4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #2f1e2e;
- color: #a39e9b;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/paraiso.light.css b/inst/bsDemo/www/styles/paraiso.light.css
deleted file mode 100644
index 685333f..0000000
--- a/inst/bsDemo/www/styles/paraiso.light.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- Paraíso (light)
- Created by Jan T. Sott (http://github.com/idleberg)
- Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
-*/
-
-/* Paraíso Comment */
-.hljs-comment,
-.hljs-title {
- color: #776e71;
-}
-
-/* Paraíso Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #ef6155;
-}
-
-/* Paraíso Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #f99b15;
-}
-
-/* Paraíso Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #fec418;
-}
-
-/* Paraíso Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #48b685;
-}
-
-/* Paraíso Aqua */
-.css .hljs-hexcolor {
- color: #5bc4bf;
-}
-
-/* Paraíso Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #06b6ef;
-}
-
-/* Paraíso Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #815ba4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #e7e9db;
- color: #4f424c;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/pojoaque.css b/inst/bsDemo/www/styles/pojoaque.css
deleted file mode 100644
index 26e748c..0000000
--- a/inst/bsDemo/www/styles/pojoaque.css
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-
-Pojoaque Style by Jason Tate
-http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
-Based on Solarized Style from http://ethanschoonover.com/solarized
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #dccf8f;
- background: url(./pojoaque.jpg) repeat scroll left top #181914;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.diff .hljs-header,
-.hljs-doctype,
-.lisp .hljs-string,
-.hljs-javadoc {
- color: #586e75;
- font-style: italic;
-}
-
-.hljs-keyword,
-.css .rule .hljs-keyword,
-.hljs-winutils,
-.javascript .hljs-title,
-.method,
-.hljs-addition,
-.css .hljs-tag,
-.hljs-list .hljs-keyword,
-.nginx .hljs-title {
- color: #b64926;
-}
-
-.hljs-number,
-.hljs-command,
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.tex .hljs-formula,
-.hljs-regexp,
-.hljs-hexcolor {
- color: #468966;
-}
-
-.hljs-title,
-.hljs-localvars,
-.hljs-function .hljs-title,
-.hljs-chunk,
-.hljs-decorator,
-.hljs-built_in,
-.hljs-identifier,
-.hljs-id {
- color: #ffb03b;
-}
-
-.hljs-attribute,
-.hljs-variable,
-.lisp .hljs-body,
-.smalltalk .hljs-number,
-.hljs-constant,
-.hljs-class .hljs-title,
-.hljs-parent,
-.hljs-type {
- color: #b58900;
-}
-
-.css .hljs-attribute {
- color: #b89859;
-}
-
-.css .hljs-number,
-.css .hljs-hexcolor {
- color: #dccf8f;
-}
-
-.css .hljs-class {
- color: #d3a60c;
-}
-
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-pi,
-.hljs-shebang,
-.hljs-symbol,
-.hljs-symbol .hljs-string,
-.diff .hljs-change,
-.hljs-special,
-.hljs-attr_selector,
-.hljs-important,
-.hljs-subst,
-.hljs-cdata {
- color: #cb4b16;
-}
-
-.hljs-deletion {
- color: #dc322f;
-}
-
-.tex .hljs-formula {
- background: #073642;
-}
diff --git a/inst/bsDemo/www/styles/pojoaque.jpg b/inst/bsDemo/www/styles/pojoaque.jpg
deleted file mode 100644
index 9c07d4ab40b6d77e90ff69f0012bcd33b21d31c3..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1186
zcmZXSe^8Tk9LK-kXFs3)f@f?)Cddzw3v4wdZyXQ;4x3=;Ja*N#%n9ik!UGmt9H3k0
zJST|5jOc(ID$FQt3C?jQZBws#kXolO1lg9Pba9BB=Q+UEBX!nY@6Uhl&+ofe$Q$y5
z@ci`~)&qzDP(lOiQ5p?p
z(`j^e7!yUAVHk%K#^GQXn?s0=VLYCI$HRoe=xCuZ>A6A3@sxEP#XqNFpIb=0)KQ#Nss_tD17;m4@$JKL;LR|K|QF3f%!L5+s(9Ft8SQ
zG|~pGpEGFW5Z|OA)-O@mNHy-g@7m8JTf?kl@vUKBGmw)Y*9sDRNr3PN!IKefWaydTe1D
zjzpyzPnD3}hBNaS4aFX7=0&~I*Hu7#4au@qVBglH#-m;QFOx_`=j
z{EqRY#Eh*yoWP^pa4H>8GH{rO?!_+xwL0(k4yL^D%^nBkJ*UI;Lx;ped8d|f*S_s@
z3~ilcRC(&NT#9Gn#UD;o^EYSMXDMf%XcUi3>;WXXD-QX3P9wMyP7eA&RS{)h5{??W3^Rq=goFJ>?lA~J-
zdYe>!xvYLW*fPT0RK7wsJRg^?x#W1*GP9_f`6t>QD_X>0d!owyN>nO2?U5}|3?hX_UZYT@^>S!9eB~bZ9U`q;`U)@L670o1g
z`Hd}h<_WRvUc|n*%v4Hbb-4tJD40iyF^q%g*&!6>hkYDvi-{Uc4yTM
zzcthN4Z{ka!+F_KzYV#yWi;c^X^q6g`pD8cp?$Kl?hCz0s^a|mH%P!CF%*<6k^~i`
zT5Mi-t5-frUcHkk^Qh}+N)Kz1&Bi95`oNc|quI>tUi~BY>xcF9(%tv2i{G6kE9*q~
qCoAGl20`)w0rdgp9H%Q=M5|p`hOhFz6$I%Y&ncY8>c?7PXyh+SL&XXJ
diff --git a/inst/bsDemo/www/styles/railscasts.css b/inst/bsDemo/www/styles/railscasts.css
deleted file mode 100644
index 21efe39..0000000
--- a/inst/bsDemo/www/styles/railscasts.css
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
-
-Railscasts-like style (c) Visoft, Inc. (Damien White)
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #232323;
- color: #e6e1dc;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.hljs-javadoc,
-.hljs-shebang {
- color: #bc9458;
- font-style: italic;
-}
-
-.hljs-keyword,
-.ruby .hljs-function .hljs-keyword,
-.hljs-request,
-.hljs-status,
-.nginx .hljs-title,
-.method,
-.hljs-list .hljs-title {
- color: #c26230;
-}
-
-.hljs-string,
-.hljs-number,
-.hljs-regexp,
-.hljs-tag .hljs-value,
-.hljs-cdata,
-.hljs-filter .hljs-argument,
-.hljs-attr_selector,
-.apache .hljs-cbracket,
-.hljs-date,
-.tex .hljs-command,
-.asciidoc .hljs-link_label,
-.markdown .hljs-link_label {
- color: #a5c261;
-}
-
-.hljs-subst {
- color: #519f50;
-}
-
-.hljs-tag,
-.hljs-tag .hljs-keyword,
-.hljs-tag .hljs-title,
-.hljs-doctype,
-.hljs-sub .hljs-identifier,
-.hljs-pi,
-.input_number {
- color: #e8bf6a;
-}
-
-.hljs-identifier {
- color: #d0d0ff;
-}
-
-.hljs-class .hljs-title,
-.hljs-type,
-.smalltalk .hljs-class,
-.hljs-javadoctag,
-.hljs-yardoctag,
-.hljs-phpdoc,
-.hljs-dartdoc {
- text-decoration: none;
-}
-
-.hljs-constant {
- color: #da4939;
-}
-
-
-.hljs-symbol,
-.hljs-built_in,
-.ruby .hljs-symbol .hljs-string,
-.ruby .hljs-symbol .hljs-identifier,
-.asciidoc .hljs-link_url,
-.markdown .hljs-link_url,
-.hljs-attribute {
- color: #6d9cbe;
-}
-
-.asciidoc .hljs-link_url,
-.markdown .hljs-link_url {
- text-decoration: underline;
-}
-
-
-
-.hljs-params,
-.hljs-variable,
-.clojure .hljs-attribute {
- color: #d0d0ff;
-}
-
-.css .hljs-tag,
-.hljs-rules .hljs-property,
-.hljs-pseudo,
-.tex .hljs-special {
- color: #cda869;
-}
-
-.css .hljs-class {
- color: #9b703f;
-}
-
-.hljs-rules .hljs-keyword {
- color: #c5af75;
-}
-
-.hljs-rules .hljs-value {
- color: #cf6a4c;
-}
-
-.css .hljs-id {
- color: #8b98ab;
-}
-
-.hljs-annotation,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in {
- color: #9b859d;
-}
-
-.hljs-preprocessor,
-.hljs-preprocessor *,
-.hljs-pragma {
- color: #8996a8 !important;
-}
-
-.hljs-hexcolor,
-.css .hljs-value .hljs-number {
- color: #a5c261;
-}
-
-.hljs-title,
-.hljs-decorator,
-.css .hljs-function {
- color: #ffc66d;
-}
-
-.diff .hljs-header,
-.hljs-chunk {
- background-color: #2f33ab;
- color: #e6e1dc;
- display: inline-block;
- width: 100%;
-}
-
-.diff .hljs-change {
- background-color: #4a410d;
- color: #f8f8f8;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-addition {
- background-color: #144212;
- color: #e6e1dc;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #600;
- color: #e6e1dc;
- display: inline-block;
- width: 100%;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.7;
-}
diff --git a/inst/bsDemo/www/styles/rainbow.css b/inst/bsDemo/www/styles/rainbow.css
deleted file mode 100644
index 69a7fa6..0000000
--- a/inst/bsDemo/www/styles/rainbow.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
-Style with support for rainbow parens
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #474949;
- color: #d1d9e1;
- -webkit-text-size-adjust: none;
-}
-
-
-.hljs-body,
-.hljs-collection {
- color: #d1d9e1;
-}
-
-.hljs-comment,
-.diff .hljs-header,
-.hljs-doctype,
-.lisp .hljs-string,
-.hljs-javadoc {
- color: #969896;
- font-style: italic;
-}
-
-.hljs-keyword,
-.clojure .hljs-attribute,
-.hljs-winutils,
-.javascript .hljs-title,
-.hljs-addition,
-.css .hljs-tag {
- color: #cc99cc;
-}
-
-.hljs-number { color: #f99157; }
-
-.hljs-command,
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.tex .hljs-formula,
-.hljs-regexp,
-.hljs-hexcolor {
- color: #8abeb7;
-}
-
-.hljs-title,
-.hljs-localvars,
-.hljs-function .hljs-title,
-.hljs-chunk,
-.hljs-decorator,
-.hljs-built_in,
-.hljs-identifier {
- color: #b5bd68;
-}
-
-.hljs-class .hljs-keyword {
- color: #f2777a;
-}
-
-.hljs-variable,
-.smalltalk .hljs-number,
-.hljs-constant,
-.hljs-class .hljs-title,
-.hljs-parent,
-.haskell .hljs-label,
-.hljs-id {
- color: #ffcc66;
-}
-
-.hljs-tag .hljs-title,
-.hljs-rules .hljs-property,
-.django .hljs-tag .hljs-keyword {
- font-weight: bold;
-}
-
-.hljs-attribute {
- color: #81a2be;
-}
-
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-pi,
-.hljs-shebang,
-.hljs-symbol,
-.hljs-symbol .hljs-string,
-.diff .hljs-change,
-.hljs-special,
-.hljs-attr_selector,
-.hljs-important,
-.hljs-subst,
-.hljs-cdata {
- color: #f99157;
-}
-
-.hljs-deletion {
- color: #dc322f;
-}
-
-.tex .hljs-formula {
- background: #eee8d5;
-}
diff --git a/inst/bsDemo/www/styles/school_book.css b/inst/bsDemo/www/styles/school_book.css
deleted file mode 100644
index 4b67800..0000000
--- a/inst/bsDemo/www/styles/school_book.css
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-
-School Book style from goldblog.com.ua (c) Zaripov Yura
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 15px 0.5em 0.5em 30px;
- font-size: 11px !important;
- line-height:16px !important;
- -webkit-text-size-adjust: none;
-}
-
-pre{
- background:#f6f6ae url(./school_book.png);
- border-top: solid 2px #d2e8b9;
- border-bottom: solid 1px #d2e8b9;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.hljs-change,
-.hljs-winutils,
-.hljs-flow,
-.nginx .hljs-title,
-.tex .hljs-special {
- color:#005599;
- font-weight:bold;
-}
-
-.hljs,
-.hljs-subst,
-.hljs-tag .hljs-keyword {
- color: #3e5915;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-type,
-.hljs-tag .hljs-value,
-.css .hljs-rules .hljs-value,
-.hljs-preprocessor,
-.hljs-pragma,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.ruby .hljs-class .hljs-parent,
-.hljs-built_in,
-.django .hljs-template_tag,
-.django .hljs-variable,
-.smalltalk .hljs-class,
-.hljs-javadoc,
-.ruby .hljs-string,
-.django .hljs-filter .hljs-argument,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-addition,
-.hljs-stream,
-.hljs-envvar,
-.apache .hljs-tag,
-.apache .hljs-cbracket,
-.nginx .hljs-built_in,
-.tex .hljs-command,
-.coffeescript .hljs-attribute {
- color: #2c009f;
-}
-
-.hljs-comment,
-.hljs-annotation,
-.hljs-decorator,
-.hljs-pi,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-shebang,
-.apache .hljs-sqbracket {
- color: #e60415;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.css .hljs-id,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-title,
-.hljs-type,
-.vbscript .hljs-built_in,
-.rsl .hljs-built_in,
-.smalltalk .hljs-class,
-.xml .hljs-tag .hljs-title,
-.diff .hljs-header,
-.hljs-chunk,
-.hljs-winutils,
-.bash .hljs-variable,
-.apache .hljs-tag,
-.tex .hljs-command,
-.hljs-request,
-.hljs-status {
- font-weight: bold;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/school_book.png b/inst/bsDemo/www/styles/school_book.png
deleted file mode 100644
index 956e9790a0e2c079b3d568348ff3accd1d9cac30..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 486
zcmeAS@N?(olHy`uVBq!ia0y~yV7?7x3vjRjNjAS6Ga$v1?~tz_9*=IcwKTAYZb?
zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkD0|R4)r;B4q#jQ7Ycl#YS5MfK$
z?b^fh#qmaEhFDxvyThwfhdfkOPApt1lr{NA;Vr%uzxJuVIyzm(ed_8_-0$LLU})H&o5Re&aDemE>EG#(|F^t9_pa-H
z_Mf?rMVrs}-M?S|?ZdY@c6s41zy8~}@a{vEa7V)wJ$+#K|u$5UvWCdFLwGac}6w{_s*=8A6L7Rfc|9gboFyt
I=akR{0OLZ+qyPW_
diff --git a/inst/bsDemo/www/styles/solarized_dark.css b/inst/bsDemo/www/styles/solarized_dark.css
deleted file mode 100644
index 5e08c59..0000000
--- a/inst/bsDemo/www/styles/solarized_dark.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
-Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #002b36;
- color: #839496;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.diff .hljs-header,
-.hljs-doctype,
-.hljs-pi,
-.lisp .hljs-string,
-.hljs-javadoc {
- color: #586e75;
-}
-
-/* Solarized Green */
-.hljs-keyword,
-.hljs-winutils,
-.method,
-.hljs-addition,
-.css .hljs-tag,
-.hljs-request,
-.hljs-status,
-.nginx .hljs-title {
- color: #859900;
-}
-
-/* Solarized Cyan */
-.hljs-number,
-.hljs-command,
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.tex .hljs-formula,
-.hljs-regexp,
-.hljs-hexcolor,
-.hljs-link_url {
- color: #2aa198;
-}
-
-/* Solarized Blue */
-.hljs-title,
-.hljs-localvars,
-.hljs-chunk,
-.hljs-decorator,
-.hljs-built_in,
-.hljs-identifier,
-.vhdl .hljs-literal,
-.hljs-id,
-.css .hljs-function {
- color: #268bd2;
-}
-
-/* Solarized Yellow */
-.hljs-attribute,
-.hljs-variable,
-.lisp .hljs-body,
-.smalltalk .hljs-number,
-.hljs-constant,
-.hljs-class .hljs-title,
-.hljs-parent,
-.hljs-type,
-.hljs-link_reference {
- color: #b58900;
-}
-
-/* Solarized Orange */
-.hljs-preprocessor,
-.hljs-preprocessor .hljs-keyword,
-.hljs-pragma,
-.hljs-shebang,
-.hljs-symbol,
-.hljs-symbol .hljs-string,
-.diff .hljs-change,
-.hljs-special,
-.hljs-attr_selector,
-.hljs-subst,
-.hljs-cdata,
-.css .hljs-pseudo,
-.hljs-header {
- color: #cb4b16;
-}
-
-/* Solarized Red */
-.hljs-deletion,
-.hljs-important {
- color: #dc322f;
-}
-
-/* Solarized Violet */
-.hljs-link_label {
- color: #6c71c4;
-}
-
-.tex .hljs-formula {
- background: #073642;
-}
diff --git a/inst/bsDemo/www/styles/solarized_light.css b/inst/bsDemo/www/styles/solarized_light.css
deleted file mode 100644
index fa2cc30..0000000
--- a/inst/bsDemo/www/styles/solarized_light.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
-Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #fdf6e3;
- color: #657b83;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.diff .hljs-header,
-.hljs-doctype,
-.hljs-pi,
-.lisp .hljs-string,
-.hljs-javadoc {
- color: #93a1a1;
-}
-
-/* Solarized Green */
-.hljs-keyword,
-.hljs-winutils,
-.method,
-.hljs-addition,
-.css .hljs-tag,
-.hljs-request,
-.hljs-status,
-.nginx .hljs-title {
- color: #859900;
-}
-
-/* Solarized Cyan */
-.hljs-number,
-.hljs-command,
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.tex .hljs-formula,
-.hljs-regexp,
-.hljs-hexcolor,
-.hljs-link_url {
- color: #2aa198;
-}
-
-/* Solarized Blue */
-.hljs-title,
-.hljs-localvars,
-.hljs-chunk,
-.hljs-decorator,
-.hljs-built_in,
-.hljs-identifier,
-.vhdl .hljs-literal,
-.hljs-id,
-.css .hljs-function {
- color: #268bd2;
-}
-
-/* Solarized Yellow */
-.hljs-attribute,
-.hljs-variable,
-.lisp .hljs-body,
-.smalltalk .hljs-number,
-.hljs-constant,
-.hljs-class .hljs-title,
-.hljs-parent,
-.hljs-type,
-.hljs-link_reference {
- color: #b58900;
-}
-
-/* Solarized Orange */
-.hljs-preprocessor,
-.hljs-preprocessor .hljs-keyword,
-.hljs-pragma,
-.hljs-shebang,
-.hljs-symbol,
-.hljs-symbol .hljs-string,
-.diff .hljs-change,
-.hljs-special,
-.hljs-attr_selector,
-.hljs-subst,
-.hljs-cdata,
-.css .hljs-pseudo,
-.hljs-header {
- color: #cb4b16;
-}
-
-/* Solarized Red */
-.hljs-deletion,
-.hljs-important {
- color: #dc322f;
-}
-
-/* Solarized Violet */
-.hljs-link_label {
- color: #6c71c4;
-}
-
-.tex .hljs-formula {
- background: #eee8d5;
-}
diff --git a/inst/bsDemo/www/styles/sunburst.css b/inst/bsDemo/www/styles/sunburst.css
deleted file mode 100644
index a709a21..0000000
--- a/inst/bsDemo/www/styles/sunburst.css
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-
-Sunburst-like style (c) Vasily Polovnyov
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #000;
- color: #f8f8f8;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.hljs-javadoc {
- color: #aeaeae;
- font-style: italic;
-}
-
-.hljs-keyword,
-.ruby .hljs-function .hljs-keyword,
-.hljs-request,
-.hljs-status,
-.nginx .hljs-title {
- color: #e28964;
-}
-
-.hljs-function .hljs-keyword,
-.hljs-sub .hljs-keyword,
-.method,
-.hljs-list .hljs-title {
- color: #99cf50;
-}
-
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-cdata,
-.hljs-filter .hljs-argument,
-.hljs-attr_selector,
-.apache .hljs-cbracket,
-.hljs-date,
-.tex .hljs-command,
-.coffeescript .hljs-attribute {
- color: #65b042;
-}
-
-.hljs-subst {
- color: #daefa3;
-}
-
-.hljs-regexp {
- color: #e9c062;
-}
-
-.hljs-title,
-.hljs-sub .hljs-identifier,
-.hljs-pi,
-.hljs-tag,
-.hljs-tag .hljs-keyword,
-.hljs-decorator,
-.hljs-shebang,
-.hljs-prompt {
- color: #89bdff;
-}
-
-.hljs-class .hljs-title,
-.hljs-type,
-.smalltalk .hljs-class,
-.hljs-javadoctag,
-.hljs-yardoctag,
-.hljs-phpdoc,
-.hljs-dartdoc {
- text-decoration: underline;
-}
-
-.hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-number {
- color: #3387cc;
-}
-
-.hljs-params,
-.hljs-variable,
-.clojure .hljs-attribute {
- color: #3e87e3;
-}
-
-.css .hljs-tag,
-.hljs-rules .hljs-property,
-.hljs-pseudo,
-.tex .hljs-special {
- color: #cda869;
-}
-
-.css .hljs-class {
- color: #9b703f;
-}
-
-.hljs-rules .hljs-keyword {
- color: #c5af75;
-}
-
-.hljs-rules .hljs-value {
- color: #cf6a4c;
-}
-
-.css .hljs-id {
- color: #8b98ab;
-}
-
-.hljs-annotation,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in {
- color: #9b859d;
-}
-
-.hljs-preprocessor,
-.hljs-pragma {
- color: #8996a8;
-}
-
-.hljs-hexcolor,
-.css .hljs-value .hljs-number {
- color: #dd7b3b;
-}
-
-.css .hljs-function {
- color: #dad085;
-}
-
-.diff .hljs-header,
-.hljs-chunk,
-.tex .hljs-formula {
- background-color: #0e2231;
- color: #f8f8f8;
- font-style: italic;
-}
-
-.diff .hljs-change {
- background-color: #4a410d;
- color: #f8f8f8;
-}
-
-.hljs-addition {
- background-color: #253b22;
- color: #f8f8f8;
-}
-
-.hljs-deletion {
- background-color: #420e09;
- color: #f8f8f8;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/tomorrow-night-blue.css b/inst/bsDemo/www/styles/tomorrow-night-blue.css
deleted file mode 100644
index dad9ee8..0000000
--- a/inst/bsDemo/www/styles/tomorrow-night-blue.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Tomorrow Night Blue Theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment {
- color: #7285b7;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #ff9da4;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #ffc58f;
-}
-
-/* Tomorrow Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #ffeead;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #d1f1a9;
-}
-
-/* Tomorrow Aqua */
-.hljs-title,
-.css .hljs-hexcolor {
- color: #99ffff;
-}
-
-/* Tomorrow Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #bbdaff;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #ebbbff;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #002451;
- color: white;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/tomorrow-night-bright.css b/inst/bsDemo/www/styles/tomorrow-night-bright.css
deleted file mode 100644
index 6796df6..0000000
--- a/inst/bsDemo/www/styles/tomorrow-night-bright.css
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Tomorrow Night Bright Theme */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment {
- color: #969896;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #d54e53;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #e78c45;
-}
-
-/* Tomorrow Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #e7c547;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #b9ca4a;
-}
-
-/* Tomorrow Aqua */
-.hljs-title,
-.css .hljs-hexcolor {
- color: #70c0b1;
-}
-
-/* Tomorrow Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #7aa6da;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #c397d8;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: black;
- color: #eaeaea;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/tomorrow-night-eighties.css b/inst/bsDemo/www/styles/tomorrow-night-eighties.css
deleted file mode 100644
index 612b5fc..0000000
--- a/inst/bsDemo/www/styles/tomorrow-night-eighties.css
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Tomorrow Night Eighties Theme */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment {
- color: #999999;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #f2777a;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #f99157;
-}
-
-/* Tomorrow Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #ffcc66;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #99cc99;
-}
-
-/* Tomorrow Aqua */
-.hljs-title,
-.css .hljs-hexcolor {
- color: #66cccc;
-}
-
-/* Tomorrow Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #6699cc;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #cc99cc;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #2d2d2d;
- color: #cccccc;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/tomorrow-night.css b/inst/bsDemo/www/styles/tomorrow-night.css
deleted file mode 100644
index 81b3e93..0000000
--- a/inst/bsDemo/www/styles/tomorrow-night.css
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Tomorrow Night Theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment {
- color: #969896;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #cc6666;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #de935f;
-}
-
-/* Tomorrow Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #f0c674;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #b5bd68;
-}
-
-/* Tomorrow Aqua */
-.hljs-title,
-.css .hljs-hexcolor {
- color: #8abeb7;
-}
-
-/* Tomorrow Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #81a2be;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #b294bb;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #1d1f21;
- color: #c5c8c6;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/tomorrow.css b/inst/bsDemo/www/styles/tomorrow.css
deleted file mode 100644
index 338c998..0000000
--- a/inst/bsDemo/www/styles/tomorrow.css
+++ /dev/null
@@ -1,92 +0,0 @@
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment {
- color: #8e908c;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-regexp,
-.ruby .hljs-constant,
-.xml .hljs-tag .hljs-title,
-.xml .hljs-pi,
-.xml .hljs-doctype,
-.html .hljs-doctype,
-.css .hljs-id,
-.css .hljs-class,
-.css .hljs-pseudo {
- color: #c82829;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-literal,
-.hljs-params,
-.hljs-constant {
- color: #f5871f;
-}
-
-/* Tomorrow Yellow */
-.ruby .hljs-class .hljs-title,
-.css .hljs-rules .hljs-attribute {
- color: #eab700;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-value,
-.hljs-inheritance,
-.hljs-header,
-.ruby .hljs-symbol,
-.xml .hljs-cdata {
- color: #718c00;
-}
-
-/* Tomorrow Aqua */
-.hljs-title,
-.css .hljs-hexcolor {
- color: #3e999f;
-}
-
-/* Tomorrow Blue */
-.hljs-function,
-.python .hljs-decorator,
-.python .hljs-title,
-.ruby .hljs-function .hljs-title,
-.ruby .hljs-title .hljs-keyword,
-.perl .hljs-sub,
-.javascript .hljs-title,
-.coffeescript .hljs-title {
- color: #4271ae;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.javascript .hljs-function {
- color: #8959a8;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: white;
- color: #4d4d4c;
- padding: 0.5em;
- -webkit-text-size-adjust: none;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
diff --git a/inst/bsDemo/www/styles/vs.css b/inst/bsDemo/www/styles/vs.css
deleted file mode 100644
index 4b5a106..0000000
--- a/inst/bsDemo/www/styles/vs.css
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-
-Visual Studio-like style based on original C# coloring by Jason Diamond
-
-*/
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: white;
- color: black;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.hljs-annotation,
-.diff .hljs-header,
-.hljs-chunk,
-.apache .hljs-cbracket {
- color: #008000;
-}
-
-.hljs-keyword,
-.hljs-id,
-.hljs-built_in,.css
-.smalltalk .hljs-class,
-.hljs-winutils,
-.bash .hljs-variable,
-.tex .hljs-command,
-.hljs-request,
-.hljs-status,
-.nginx .hljs-title,
-.xml .hljs-tag,
-.xml .hljs-tag .hljs-value {
- color: #00f;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-parent,
-.hljs-tag .hljs-value,
-.hljs-rules .hljs-value,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.hljs-template_tag,
-.django .hljs-variable,
-.hljs-addition,
-.hljs-flow,
-.hljs-stream,
-.apache .hljs-tag,
-.hljs-date,
-.tex .hljs-formula,
-.coffeescript .hljs-attribute {
- color: #a31515;
-}
-
-.ruby .hljs-string,
-.hljs-decorator,
-.hljs-filter .hljs-argument,
-.hljs-localvars,
-.hljs-array,
-.hljs-attr_selector,
-.hljs-pseudo,
-.hljs-pi,
-.hljs-doctype,
-.hljs-deletion,
-.hljs-envvar,
-.hljs-shebang,
-.hljs-preprocessor,
-.hljs-pragma,
-.userType,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in,
-.tex .hljs-special,
-.hljs-prompt {
- color: #2b91af;
-}
-
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-javadoc,
-.hljs-xmlDocTag {
- color: #808080;
-}
-
-.hljs-type,
-.hljs-typename { font-weight: bold; }
-
-.vhdl .hljs-string { color: #666666; }
-.vhdl .hljs-literal { color: #a31515; }
-.vhdl .hljs-attribute { color: #00b0e8; }
-
-.xml .hljs-attribute { color: #f00; }
diff --git a/inst/bsDemo/www/styles/xcode.css b/inst/bsDemo/www/styles/xcode.css
deleted file mode 100644
index 0b0f8eb..0000000
--- a/inst/bsDemo/www/styles/xcode.css
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-
-XCode style (c) Angel Garcia
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #fff;
- color: black;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-comment,
-.hljs-javadoc {
- color: #006a00;
-}
-
-.hljs-keyword,
-.hljs-literal,
-.nginx .hljs-title {
- color: #aa0d91;
-}
-.method,
-.hljs-list .hljs-title,
-.hljs-tag .hljs-title,
-.setting .hljs-value,
-.hljs-winutils,
-.tex .hljs-command,
-.http .hljs-title,
-.hljs-request,
-.hljs-status {
- color: #008;
-}
-
-.hljs-envvar,
-.tex .hljs-special {
- color: #660;
-}
-
-.hljs-string {
- color: #c41a16;
-}
-.hljs-tag .hljs-value,
-.hljs-cdata,
-.hljs-filter .hljs-argument,
-.hljs-attr_selector,
-.apache .hljs-cbracket,
-.hljs-date,
-.hljs-regexp {
- color: #080;
-}
-
-.hljs-sub .hljs-identifier,
-.hljs-pi,
-.hljs-tag,
-.hljs-tag .hljs-keyword,
-.hljs-decorator,
-.ini .hljs-title,
-.hljs-shebang,
-.hljs-prompt,
-.hljs-hexcolor,
-.hljs-rules .hljs-value,
-.hljs-symbol,
-.hljs-symbol .hljs-string,
-.hljs-number,
-.css .hljs-function,
-.hljs-function .hljs-title,
-.coffeescript .hljs-attribute {
- color: #1c00cf;
-}
-
-.hljs-class .hljs-title,
-.smalltalk .hljs-class,
-.hljs-javadoctag,
-.hljs-yardoctag,
-.hljs-phpdoc,
-.hljs-dartdoc,
-.hljs-type,
-.hljs-typename,
-.hljs-tag .hljs-attribute,
-.hljs-doctype,
-.hljs-class .hljs-id,
-.hljs-built_in,
-.setting,
-.hljs-params,
-.clojure .hljs-attribute {
- color: #5c2699;
-}
-
-.hljs-variable {
- color: #3f6e74;
-}
-.css .hljs-tag,
-.hljs-rules .hljs-property,
-.hljs-pseudo,
-.hljs-subst {
- color: #000;
-}
-
-.css .hljs-class,
-.css .hljs-id {
- color: #9b703f;
-}
-
-.hljs-value .hljs-important {
- color: #ff7700;
- font-weight: bold;
-}
-
-.hljs-rules .hljs-keyword {
- color: #c5af75;
-}
-
-.hljs-annotation,
-.apache .hljs-sqbracket,
-.nginx .hljs-built_in {
- color: #9b859d;
-}
-
-.hljs-preprocessor,
-.hljs-preprocessor *,
-.hljs-pragma {
- color: #643820;
-}
-
-.tex .hljs-formula {
- background-color: #eee;
- font-style: italic;
-}
-
-.diff .hljs-header,
-.hljs-chunk {
- color: #808080;
- font-weight: bold;
-}
-
-.diff .hljs-change {
- background-color: #bccff9;
-}
-
-.hljs-addition {
- background-color: #baeeba;
-}
-
-.hljs-deletion {
- background-color: #ffc8bd;
-}
-
-.hljs-comment .hljs-yardoctag {
- font-weight: bold;
-}
-
-.method .hljs-id {
- color: #000;
-}
diff --git a/inst/bsDemo/www/styles/zenburn.css b/inst/bsDemo/www/styles/zenburn.css
deleted file mode 100644
index a2ea87b..0000000
--- a/inst/bsDemo/www/styles/zenburn.css
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-
-Zenburn style from voldmar.ru (c) Vladimir Epifanov
-based on dark.css by Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #3f3f3f;
- color: #dcdcdc;
- -webkit-text-size-adjust: none;
-}
-
-.hljs-keyword,
-.hljs-tag,
-.css .hljs-class,
-.css .hljs-id,
-.lisp .hljs-title,
-.nginx .hljs-title,
-.hljs-request,
-.hljs-status,
-.clojure .hljs-attribute {
- color: #e3ceab;
-}
-
-.django .hljs-template_tag,
-.django .hljs-variable,
-.django .hljs-filter .hljs-argument {
- color: #dcdcdc;
-}
-
-.hljs-number,
-.hljs-date {
- color: #8cd0d3;
-}
-
-.dos .hljs-envvar,
-.dos .hljs-stream,
-.hljs-variable,
-.apache .hljs-sqbracket {
- color: #efdcbc;
-}
-
-.dos .hljs-flow,
-.diff .hljs-change,
-.python .exception,
-.python .hljs-built_in,
-.hljs-literal,
-.tex .hljs-special {
- color: #efefaf;
-}
-
-.diff .hljs-chunk,
-.hljs-subst {
- color: #8f8f8f;
-}
-
-.dos .hljs-keyword,
-.hljs-decorator,
-.hljs-title,
-.hljs-type,
-.diff .hljs-header,
-.ruby .hljs-class .hljs-parent,
-.apache .hljs-tag,
-.nginx .hljs-built_in,
-.tex .hljs-command,
-.hljs-prompt {
- color: #efef8f;
-}
-
-.dos .hljs-winutils,
-.ruby .hljs-symbol,
-.ruby .hljs-symbol .hljs-string,
-.ruby .hljs-string {
- color: #dca3a3;
-}
-
-.diff .hljs-deletion,
-.hljs-string,
-.hljs-tag .hljs-value,
-.hljs-preprocessor,
-.hljs-pragma,
-.hljs-built_in,
-.hljs-javadoc,
-.smalltalk .hljs-class,
-.smalltalk .hljs-localvars,
-.smalltalk .hljs-array,
-.css .hljs-rules .hljs-value,
-.hljs-attr_selector,
-.hljs-pseudo,
-.apache .hljs-cbracket,
-.tex .hljs-formula,
-.coffeescript .hljs-attribute {
- color: #cc9393;
-}
-
-.hljs-shebang,
-.diff .hljs-addition,
-.hljs-comment,
-.hljs-annotation,
-.hljs-pi,
-.hljs-doctype {
- color: #7f9f7f;
-}
-
-.coffeescript .javascript,
-.javascript .xml,
-.tex .hljs-formula,
-.xml .javascript,
-.xml .vbscript,
-.xml .css,
-.xml .hljs-cdata {
- opacity: 0.5;
-}
-
diff --git a/inst/www/shinyBS.js b/inst/www/shinyBS.js
index 6fb6ba8..5ca6e1c 100644
--- a/inst/www/shinyBS.js
+++ b/inst/www/shinyBS.js
@@ -1,15 +1,48 @@
var shinyBS = {inputBindings: {}};
+shinyBS.inputBindings.modal = new Shiny.InputBinding();
+$.extend(shinyBS.inputBindings.modal, {
+ find: function(scope) {
+ return $(scope).find(".sbs-modal");
+ },
+ getValue: function(el) {
+ return $(el).hasClass("in");
+ },
+ subscribe: function(el, callback) {
+ $(el).on("hidden.bs.modal shown.bs.modal", callback)
+ },
+ unsubscribe: function(el) {
+ $(el).off("hidden.bs.modal shown.bs.modal")
+ },
+ receiveMessage: function(el, data) {
+ if(data.hasOwnProperty("toggle")) {
+ if(data.toggle == "show") {
+ $(el).modal("show");
+ } else if(data.toggle == "hide") {
+ $(el).modal("hide");
+ } else {
+ $(el).modal("toggle");
+ }
+ };
+ },
+ initialize: function(el) {
+ $("#" + $(el).attr("data-sbs-trigger")).attr({"data-toggle": "modal", "data-target": "#" + $(el).attr("id")});
+ }
+});
+Shiny.inputBindings.register(shinyBS.inputBindings.modal);
+
shinyBS.inputBindings.collapse = new Shiny.InputBinding();
$.extend(shinyBS.inputBindings.collapse, {
find: function(scope) {
- return $(scope).find("sbs-panel-group");
+ return $(scope).find(".sbs-panel-group");
},
getValue: function(el) {
return $(el).data("sbs-value");
},
receiveMessage: function(el, data) {
var $el = $(el);
+/* I would think this code should work, but it doesn't for some reason so I am
+ commenting it out.
if(data.hasOwnProperty('multiple')) {
if(data.multiple) {
$el.find(".collapse").each(function(i) {$(this).collapse({parent: false, toggle: false})});
@@ -17,10 +50,14 @@ $.extend(shinyBS.inputBindings.collapse, {
$el.find(".collapse").each(function(i) {$(this).collapse({parent: "#"+$el.attr("id"), toggle: false})});
}
}
+*/
if(data.hasOwnProperty('style')) {
- panels = Object.keys(data.style)
+ var panels = Object.keys(data.style)
for(var i = 0; i < panels.length; i++) {
- $el.find("#" + panels[i]).parent().attr("class", "panel panel-" + data.style[panels[i]])
+ var $p = $el.find("div[value='" + panels[i] + "']")
+ $p
+ .removeClass("panel-primary panel-danger panel-warning panel-error panel-info panel-success")
+ .addClass("panel-" + data.style[panels[i]]);
}
}
if(data.hasOwnProperty('open')) {
@@ -28,7 +65,7 @@ $.extend(shinyBS.inputBindings.collapse, {
data.open = [data.open]
}
data.open.forEach(function(value, index, array) {
- $el.find("#" + value).collapse("show");
+ $el.find("div[value='" + value + "'] > .panel-collapse").collapse("show");
})
}
if(data.hasOwnProperty("close")) {
@@ -36,7 +73,7 @@ $.extend(shinyBS.inputBindings.collapse, {
data.close = [data.close];
}
data.close.forEach(function(value, index, array) {
- $el.find("#" + value).collapse("hide");
+ $el.find("div[value='" + value + "'] > .panel-collapse").collapse("hide");
})
}
},
@@ -51,6 +88,7 @@ $.extend(shinyBS.inputBindings.collapse, {
if($(this).find("div.panel-collapse.collapse").hasClass("in")) {
val.push($(this).attr("value"));
}
+ $(this).find("div.panel-collapse.collapse").collapse({parent: "#" + $el.attr("id"), toggle: false});
});
$el.data("sbs-value", val);
$panels.on("show.bs.collapse", function(event) {
@@ -68,6 +106,8 @@ $.extend(shinyBS.inputBindings.collapse, {
});
}
})
+Shiny.inputBindings.register(shinyBS.inputBindings.collapse);
+
Shiny.addCustomMessageHandler("bsAlertCreate", function(data) {
@@ -111,4 +151,56 @@ Shiny.addCustomMessageHandler("bsAlertCreate", function(data) {
Shiny.addCustomMessageHandler("bsAlertClose", function(alertId) {
$("#" + alertId).alert('close');
-});
\ No newline at end of file
+});
+
+// The following function refer to tooltips but are used in the creation of
+// tooltips and popovers because there structure is so similar. type="popover"
+// will create a popover.
+
+shinyBS.addTooltip = function(id, type, opts) {
+ var $id = shinyBS.getTooltipTarget(id);
+ var dopts = {html: true};
+ opts = $.extend(opts, dopts);
+
+ if(type == "tooltip") {
+ $id.tooltip("destroy");
+ $id.tooltip(opts);
+ } else if(type == "popover") {
+ $id.popover("destroy");
+ $id.popover(opts);
+ }
+
+}
+
+shinyBS.removeTooltip = function(id, type) {
+ var $id = shinyBS.getTooltipTarget(id);
+ if(type == "tooltip") {
+ $(id).tooltip("destroy");
+ } else if(type == "popover") {
+ $(id).popover("destroy");
+ }
+}
+
+// Makes adjustments to the tooltip and popover targets for specialized
+// shiny inputs/outputs
+shinyBS.getTooltipTarget = function(id) {
+
+ var $id = $("#" + id);
+
+ if($id.hasClass("js-range-slider")) {
+ $id = $id.parent();
+ } else if($id.hasClass("selectized")) {
+ $id = $id.siblings("div.selectize-control")
+ }
+
+ return $id;
+
+}
+
+Shiny.addCustomMessageHandler("updateTooltipOrPopover", function(data) {
+ if(data.action == "add") {
+ shinyBS.addTooltip(data.id, data.type, data.options);
+ } else if(data.action == "remove") {
+ shinyBS.removeTooltip(data.id, data.type)
+ }
+})
diff --git a/man-roxygen/component.R b/man-roxygen/component.R
deleted file mode 100644
index 3d6b78c..0000000
--- a/man-roxygen/component.R
+++ /dev/null
@@ -1,14 +0,0 @@
-#'<% low <- tolower(item_name) %>
-#'<% cn <- gsub("\\s","", low) %>
-#'@rdname <%=cn %>s
-#'@name <%=item_name %>s
-#'
-#'@title Create Twitter Bootstrap <%=item_name %>s
-#'
-#'@description Functions to create and update Twitter Bootstrap <%=item_name %>s in shiny
-#'@note Run \code{bsDemo()} for a live example of shinyBS <%=item_name%>s functionality.
-#'@author Eric Bailey
-#'@family <%=low%>
-#'@references \href{http://getbootstrap.com/2.3.2/}{Twitter Bootstrap 2.3.2}
-#'@examples \dontrun{Run bsDemo() for examples}
-#'@export
diff --git a/man-roxygen/component_header.R b/man-roxygen/component_header.R
deleted file mode 100644
index e46e909..0000000
--- a/man-roxygen/component_header.R
+++ /dev/null
@@ -1,7 +0,0 @@
-#'<% low <- tolower(item_name) %>
-#'@rdname <%=low %>s
-#'@name <%=item_name %>s
-#'
-#'@title Create Twitter Bootstrap <%=item_name %>s
-#'
-#'@description Functions to create and update Twitter Bootstrap <%=item_name %>s in shiny
diff --git a/man-roxygen/footer.R b/man-roxygen/footer.R
index 1f090c9..0abb5ed 100644
--- a/man-roxygen/footer.R
+++ b/man-roxygen/footer.R
@@ -1,5 +1,8 @@
-#'@note Run \code{bsDemo()} for a live examples of shinyBS functionality.
-#'@author Eric Bailey
-#'@references \href{http://getbootstrap.com}{Twitter Bootstrap 3}
-#'@examples \dontrun{Run bsDemo() for examples}
-#'@export
+#'@seealso \href{http://getbootstrap.com}{Twitter Bootstrap 3}
+#'
+#'@note
+#' Run \code{example("<%=family_name %>", "shinyBS", ask = FALSE)} for an example
+#' of <%=item_name %> functionality
+#'
+#'@family <%=family_name %>
+#'@name <%=item_name %>
diff --git a/man-roxygen/group_footer.R b/man-roxygen/group_footer.R
deleted file mode 100644
index 7785e92..0000000
--- a/man-roxygen/group_footer.R
+++ /dev/null
@@ -1,3 +0,0 @@
-#'@note Run \code{bsDemo()} for a live examples of shinyBS functionality.
-#'@references \href{http://getbootstrap.com}{Twitter Bootstrap 3}
-#'@export
diff --git a/man-roxygen/item_details.R b/man-roxygen/item_details.R
new file mode 100644
index 0000000..7bfbed0
--- /dev/null
+++ b/man-roxygen/item_details.R
@@ -0,0 +1,3 @@
+#'@details
+#'See \link{<%=family_name %>} for more information about how to use \code{<%=item_name %>} with the
+#'rest of the <%=family_name %> family.
diff --git a/man-roxygen/subcomponent.R b/man-roxygen/subcomponent.R
deleted file mode 100644
index 3abfb62..0000000
--- a/man-roxygen/subcomponent.R
+++ /dev/null
@@ -1,15 +0,0 @@
-#'<% low <- tolower(item_name) %>
-#'@rdname <%=gsub("\\s","", low)%>s
-#'@name <%=item_name %>s
-#'
-#'@title Create <%=item_name %>s for Twitter Bootstrap <%=component%>s in shiny
-#'
-#'@description Functions to create <%=item_name%>s for use with Twitter Bootstrap
-#' <%=component%>s in shiny
-#'@note Run \code{bsDemo()} for a live example of shinyBS <%=component%>s
-#' functionality.
-#'@author Eric Bailey
-#'@family <%=tolower(component)%>
-#'@references \href{http://getbootstrap.com/2.3.2/}{Twitter Bootstrap 2.3.2}
-#'@examples \dontrun{Run bsDemo() for examples}
-#'@export
diff --git a/man/Alerts.Rd b/man/Alerts.Rd
index a293ee7..04da51b 100644
--- a/man/Alerts.Rd
+++ b/man/Alerts.Rd
@@ -1,37 +1,8 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
-% Please edit documentation in R/bsAlert.R
+% Please edit documentation in R/Alerts.R
\name{Alerts}
\alias{Alerts}
-\alias{bsAlert}
-\alias{closeAlert}
-\alias{createAlert}
\title{Alerts}
-\usage{
-bsAlert(anchorId)
-
-createAlert(session, anchorId, alertId = NULL, title = NULL,
- content = NULL, style = NULL, dismiss = TRUE, append = TRUE)
-
-closeAlert(session, alertId)
-}
-\arguments{
-\item{anchorId}{A unique ID that identifies the anchor.}
-
-\item{session}{The \code{session} object passed to function given to
-\code{shinyServer}.}
-
-\item{alertId}{A unique ID that identifies the specific alert being created.}
-
-\item{title}{An optional title for the alert. This will appear at the top of the alert in larger font.}
-
-\item{content}{The main body of the alert. HTML tags are allowed.}
-
-\item{style}{A Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}.}
-
-\item{dismiss}{\code{logical} indicating whether the alert should be user dismissable.}
-
-\item{append}{\code{logical} indicating whether the alert should be appended to the anchor, below any existing alerts.}
-}
\description{
Alerts allow you to communicate information to the user on the fly. Standard
Bootstrap styling options give the user a hint at the type of information
@@ -50,8 +21,24 @@ not use \code{createAlert} to give the user info about what they need to
change.
}
\note{
-Run \code{bsDemo()} for a live examples of shinyBS functionality.
+Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
+of Alerts functionality
+}
+\section{Components}{
+
+There are three functions in the Alerts family:
+ \describe{
+ \item{\code{\link{bsAlert}}}{Used in the UI to create an anchor where your
+ Alerts will be displayed.}
+ \item{\code{\link{createAlert}}}{Used in the Server logic to create
+ alerts. This would be used within a reactive context to display error
+ or success messages to the user based on the status of that context.}
+ \item{\code{\link{closeAlert}}}{Used in the Server logic to close an alert
+ that is already open. By default, Alerts are dismissable by the user,
+ but this offers you a way to close them programmatically.}
+ }
}
+
\section{Changes}{
\code{style} was called \code{type} in previous versions of shinyBS.
@@ -61,12 +48,45 @@ Run \code{bsDemo()} for a live examples of shinyBS functionality.
\code{content} was called \code{message} in previous versions of shinyBS.
}
\examples{
-\dontrun{Run bsDemo() for examples}
+\donttest{
+library(shiny)
+library(shinyBS)
+shinyApp(
+ ui = fluidPage(
+ sidebarLayout(
+ sidebarPanel(textInput("num1", NULL, value = 100),
+ "divided by", textInput("num2", NULL, value = 20),
+ "equals", textOutput("exampleOutput")),
+ mainPanel(
+ bsAlert("alert")
+ )
+ )
+ ),
+ server = function(input, output, session) {
+ output$exampleOutput <- renderText({
+ num1 <- as.numeric(input$num1)
+ num2 <- as.numeric(input$num2)
+
+ if(is.na(num1) | is.na(num2)) {
+ createAlert(session, "alert", "exampleAlert", title = "Oops",
+ content = "Both inputs should be numeric.", append = FALSE)
+ } else if(num2 == 0) {
+ createAlert(session, "alert", "exampleAlert", title = "Oops",
+ content = "You cannot divide by 0.", append = FALSE)
+ } else {
+ closeAlert(session, "exampleAlert")
+ return(num1/num2)
+ }
+
+ })
+ }
+)
}
-\author{
-Eric Bailey
}
-\references{
+\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Alerts: \code{\link{bsAlert}};
+ \code{\link{closeAlert}}; \code{\link{createAlert}}
}
diff --git a/man/Collapses.Rd b/man/Collapses.Rd
index 4e53437..f1c3ab5 100644
--- a/man/Collapses.Rd
+++ b/man/Collapses.Rd
@@ -1,16 +1,28 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
-% Please edit documentation in R/bsCollapse.R
+% Please edit documentation in R/Collapse.R
\name{Collapses}
\alias{Collapses}
-\title{Collapse Panels}
+\title{Collapses}
\description{
Collapse panels allow you to reduce clutter in your Shiny app by making
panels of information that open and close with a user's click. Any type of
content can go in a collapse panel. Standard Bootstrap styling options are
available.
}
+\details{
+Collapses are designed to mimic \code{\link{tabsetPanel}} in their implementation.
+Start with \code{bsCollapse} to create a panel group, then fill it with panels
+using \code{bsCollapsePanel}.
+
+\code{bsCollapse} acts as an input, so you can retrieve which panels are open
+from the input object passed to the function in \code{\link{shinyServer}}.
+
+\code{updateCollapse} can be used within your server logic to open/close
+collapse panels or to change their style.
+}
\note{
-Run \code{bsDemo()} for a live examples of shinyBS functionality.
+Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
+of Collapses functionality
}
\section{Components}{
@@ -20,10 +32,51 @@ Run \code{bsDemo()} for a live examples of shinyBS functionality.
\item{\code{\link{updateCollapse}}}{Used within your server logic to open/close collapse panels or change their style.}
}
}
-\references{
-\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+\section{Changes}{
+
+\code{style} is a new option that wasn't available in previous versions of
+shinyBS.
+}
+\examples{
+\donttest{
+library(shiny)
+library(shinyBS)
+
+shinyApp(
+ ui = fluidPage(
+ sidebarLayout(
+ sidebarPanel(HTML("This button will open Panel 1 using updateCollapse."),
+ actionButton("p1Button", "Push Me!"),
+ selectInput("styleSelect", "Select style for Panel 1",
+ c("default", "primary", "danger", "warning", "info", "success"))
+ ),
+ mainPanel(
+ bsCollapse(id = "collapseExample", open = "Panel 2",
+ bsCollapsePanel("Panel 1", "This is a panel with just text ",
+ "and has the default style. You can change the style in ",
+ "the sidebar.", style = "info"),
+ bsCollapsePanel("Panel 2", "This panel has a generic plot. "
+ "and a 'success' style.", plotOutput("genericPlot"), style = "success")
+ )
+ )
+ )
+ ),
+ server = function(input, output, session) {
+ output$genericPlot <- renderPlot(plot(rnorm(100)))
+ observeEvent(input$p1Button, ({
+ updateCollapse(session, "collapseExample", open = "Panel 1")
+ }))
+ observeEvent(input$styleSelect, ({
+ updateCollapse(session, "collapseExample", style = list("Panel 1" = input$styleSelect))
+ }))
+ }
+)
+}
}
\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
Other Collapses: \code{\link{bsCollapsePanel}};
\code{\link{bsCollapse}}; \code{\link{updateCollapse}}
}
diff --git a/man/Modals.Rd b/man/Modals.Rd
new file mode 100644
index 0000000..72b3bf3
--- /dev/null
+++ b/man/Modals.Rd
@@ -0,0 +1,105 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/Modals.R
+\name{Modals}
+\alias{Modals}
+\title{Modals}
+\description{
+Modal windows are similar to popups but are rendered within the
+original window. They can contain any combination of shiny inputs, shiny
+outputs, and html. Possible uses include extra controls that you don't want
+cluttering up the main app display or help pages to explain your apps
+operation.
+}
+\details{
+Use \code{\link{bsModal}} in your UI to create a modal window. It works
+like \code{\link{Collapses}} or \code{\link{tabPanel}}, any non-named arguments
+will be passed as content for the modal.
+
+Create a button or link and assign its \code{inputId} as the \code{trigger}
+in \code{\link{bsModal}}.
+}
+\note{
+Run \code{example("Modals", "shinyBS", ask = FALSE)} for an example
+of Modals functionality
+}
+\section{Components}{
+
+There are only two functions in the Modals family:
+ \describe{
+ \item{\code{\link{bsModal}}}{Used in the UI to create a modal window.}
+ \item{\code{\link{toggleModal}}}{Used in the Server logic to open or
+ close a modal window programmatically.}
+ }
+}
+
+\section{Changes}{
+
+There is now a \code{toggle} argument in \code{\link{toggleModal}} that allows
+you to specify whether you want the modal to open or close.
+
+The \code{size} argument in \code{\link{bsModal}} allows you to specify the
+size of the modal window. Either \code{small} or \code{large}.
+}
+\examples{
+\donttest{
+library(shiny)
+library(shinyBS)
+
+shinyApp(
+ ui = fluidPage(
+ sidebarLayout(
+ sidebarPanel(
+ sliderInput("bins",
+ "Number of bins:",
+ min = 1,
+ max = 50,
+ value = 30),
+ actionButton("tabBut", "View Table")
+ ),
+
+ mainPanel(
+ plotOutput("distPlot"),
+ bsModal("modalExample", "Data Table", "tabBut", size = "large",
+ dataTableOutput("distTable"))
+ )
+ )
+ ),
+ server = function(input, output, session) {
+
+ output$distPlot <- renderPlot({
+
+ x <- faithful[, 2]
+ bins <- seq(min(x), max(x), length.out = input$bins + 1)
+
+ # draw the histogram with the specified number of bins
+ hist(x, breaks = bins, col = 'darkgray', border = 'white')
+
+ })
+
+ output$distTable <- renderDataTable({
+
+ x <- faithful[, 2]
+ bins <- seq(min(x), max(x), length.out = input$bins + 1)
+
+ # draw the histogram with the specified number of bins
+ tab <- hist(x, breaks = bins, plot = FALSE)
+ tab$breaks <- sapply(seq(length(tab$breaks) - 1), function(i) {
+ paste0(signif(tab$breaks[i], 3), "-", signif(tab$breaks[i+1], 3))
+ })
+ tab <- as.data.frame(do.call(cbind, tab))
+ colnames(tab) <- c("Bins", "Counts", "Density")
+ return(tab[, 1:3])
+
+ }, options = list(pageLength=10))
+
+ }
+)
+}
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Modals: \code{\link{bsModal}};
+ \code{\link{toggleModal}}
+}
+
diff --git a/man/Tooltips_and_Popovers.Rd b/man/Tooltips_and_Popovers.Rd
new file mode 100644
index 0000000..b91e5a9
--- /dev/null
+++ b/man/Tooltips_and_Popovers.Rd
@@ -0,0 +1,108 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/Tooltips.R
+\name{Tooltips_and_Popovers}
+\alias{Tooltips_and_Popovers}
+\title{Tooltips and Popovers}
+\description{
+Tooltips and Popovers allow you to add additional information about controls
+or outputs without cluttering up your user interface. You can add a tooltip to
+a button that displays on hover and better explains what the button will do, or
+you could add a popover to an output providing further analysis of that output.
+}
+\details{
+You can create tooltips and popovers from either the UI script or within the
+Server logic. \code{\link{bsTooltip}} and \code{\link{bsPopover}} are used in
+the UI, and \code{\link{addTooltip}} and \code{\link{addPopover}} are used in
+the Server logic.
+}
+\note{
+Tooltips and Popovers cannot contain shiny inputs or outputs.
+
+There must be at least one \code{shinyBS} component in the UI of your
+app in order for the necessary dependencies to be loaded. Because of this,
+\code{\link{addTooltip}} and \code{\link{addPopover}} will not work if they
+are the only shinyBS components in your app.
+
+Tooltips and popovers may not work on some of the more complex shiny inputs
+or outputs. If you encounter a problem with tooltips or popovers not appearing
+please file a issue on the github page so I can fix it.
+
+Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
+of Tooltips_and_Popovers functionality
+}
+\section{Components}{
+
+There are six functions in the Tooltips and Popovers family:
+ \describe{
+ \item{\code{\link{bsTooltip}}}{Used in the UI to add a tooltip to an element
+ in your UI.}
+ \item{\code{\link{bsPopover}}}{Used in the UI to add a popover to an element
+ in your UI.}
+ \item{\code{\link{addTooltip}}}{Used in the Server logic to add a tooltip
+ to an element in your UI.}
+ \item{\code{\link{addPopover}}}{Used in the Server logic to add a popover
+ to an element in your UI.}
+ \item{\code{\link{removeTooltip}}}{Used in the Server logic to remove a
+ tooltip from an element in your UI.}
+ \item{\code{\link{removePopover}}}{Used in the Server logic to remove a
+ popover from an element in your UI.}
+ }
+}
+
+\section{Changes}{
+
+An \code{options} argument has been added to the creation functions to allow
+advanced users more control over how the tooltips and popovers appear. See
+the \href{http://getbootstrap.com}{Twitter Bootstrap 3 documentation} for more
+details.
+}
+\examples{
+\donttest{
+library(shiny)
+library(shinyBS)
+shinyApp(
+ ui = fluidPage(
+ sidebarLayout(
+ sidebarPanel(
+ sliderInput("bins",
+ "Number of bins:",
+ min = 1,
+ max = 50,
+ value = 30),
+ bsTooltip("bins", "The wait times will be broken into this many equally spaced bins",
+ "right", options = list(container = "body"))
+ ),
+ mainPanel(
+ plotOutput("distPlot")
+ )
+ )
+ ),
+ server = function(input, output, session) {
+ output$distPlot <- renderPlot({
+
+ # generate bins based on input$bins from ui.R
+ x <- faithful[, 2]
+ bins <- seq(min(x), max(x), length.out = input$bins + 1)
+
+ # draw the histogram with the specified number of bins
+ hist(x, breaks = bins, col = 'darkgray', border = 'white')
+
+ })
+ addPopover(session, "distPlot", "Data", content = paste0("Waiting time between ",
+ "eruptions and the duration of the eruption for the Old Faithful geyser ",
+ "in Yellowstone National Park, Wyoming, USA.
Azzalini, A. and ",
+ "Bowman, A. W. (1990). A look at some data on the Old Faithful geyser. ",
+ "Applied Statistics 39, 357-365.
"), trigger = 'click')
+ }
+)
+}
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{addPopover}};
+ \code{\link{addTooltip}}; \code{\link{bsPopover}};
+ \code{\link{bsTooltip}}; \code{\link{removePopover}};
+ \code{\link{removeTooltip}}
+}
+
diff --git a/man/addPopover.Rd b/man/addPopover.Rd
new file mode 100644
index 0000000..fd45863
--- /dev/null
+++ b/man/addPopover.Rd
@@ -0,0 +1,47 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/addPopover.R
+\name{addPopover}
+\alias{addPopover}
+\title{addPopover}
+\usage{
+addPopover(session, id, title, content, placement = "bottom",
+ trigger = "hover", options = NULL)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{id}{The id of the element to attach the popover to.}
+
+\item{title}{The title of the popover.}
+
+\item{content}{The main content of the popover.}
+
+\item{placement}{Where the popover should appear relative to its target
+(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
+
+\item{trigger}{What action should cause the popover to appear? (\code{hover},
+\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+
+\item{options}{A named list of additional options to be set on the popover.}
+}
+\description{
+\code{addPopover} is used within the Server logic of an app to add a popover to a Shiny
+input or output.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{addPopover} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
+of addPopover functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addTooltip}}; \code{\link{bsPopover}};
+ \code{\link{bsTooltip}}; \code{\link{removePopover}};
+ \code{\link{removeTooltip}}
+}
+
diff --git a/man/addTooltip.Rd b/man/addTooltip.Rd
new file mode 100644
index 0000000..82cf2ac
--- /dev/null
+++ b/man/addTooltip.Rd
@@ -0,0 +1,45 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/addTooltip.R
+\name{addTooltip}
+\alias{addTooltip}
+\title{addTooltip}
+\usage{
+addTooltip(session, id, title, placement = "bottom", trigger = "hover",
+ options = NULL)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{id}{The id of the element to attach the tooltip to.}
+
+\item{title}{The content of the tooltip.}
+
+\item{placement}{Where the tooltip should appear relative to its target
+(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
+
+\item{trigger}{What action should cause the tooltip to appear? (\code{hover},
+\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+
+\item{options}{A named list of additional options to be set on the tooltip.}
+}
+\description{
+\code{addTooltip} is used within the Server logic of an app to add a tooltip to a Shiny
+input or output.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{addTooltip} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
+of addTooltip functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addPopover}}; \code{\link{bsPopover}};
+ \code{\link{bsTooltip}}; \code{\link{removePopover}};
+ \code{\link{removeTooltip}}
+}
+
diff --git a/man/bsAlert.Rd b/man/bsAlert.Rd
new file mode 100644
index 0000000..cc75c5a
--- /dev/null
+++ b/man/bsAlert.Rd
@@ -0,0 +1,30 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsAlert.R
+\name{bsAlert}
+\alias{bsAlert}
+\title{bsAlert}
+\usage{
+bsAlert(anchorId)
+}
+\arguments{
+\item{anchorId}{A unique id the identifies the anchor.}
+}
+\description{
+\code{bsAlert} creates an anchor point in your UI definition. This anchor point
+is where alerts created in your Server logic will be displayed.
+}
+\details{
+See \link{Alerts} for more information about how to use \code{bsAlert} with the
+rest of the Alerts family.
+}
+\note{
+Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
+of bsAlert functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Alerts: \code{\link{Alerts}};
+ \code{\link{closeAlert}}; \code{\link{createAlert}}
+}
+
diff --git a/man/bsCollapse.Rd b/man/bsCollapse.Rd
index 9a0e717..b20d5d7 100644
--- a/man/bsCollapse.Rd
+++ b/man/bsCollapse.Rd
@@ -7,35 +7,32 @@
bsCollapse(..., id = NULL, multiple = FALSE, open = NULL)
}
\arguments{
-\item{id}{If provided, you can use input$id in your server script to open or
-close \code{bsCollapsePanels} within the \code{bsCollapse}.}
+\item{id}{\bold{Optional} You can use \code{input$id} in your Server logic to
+determine which panels are open, and \code{\link{updateCollapse}} to open/close
+panels.}
-\item{multiple}{\code{logical} indication whether multiple \code{bsCollapsePanels}
-within this \code{bsCollapse} can be open at once.}
+\item{multiple}{Can more than one panel be open at a time? Defaults to \code{FALSE}.}
-\item{open}{The \code{value} (or, if none was supplied, the title) of the
-\code{bsCollapsePanel} that should be open. If \code{multiple = TRUE}, then
-this can be a vector of \code{value}s or \code{title}s.}
+\item{open}{The \code{value}, (or if none was supplied, the \code{title}) of
+the panel(s) you want open on load.}
-\item{\dots}{\code{\link{bsCollapsePanel}} elements to include in the \code{bsCollapse}.}
+\item{\dots}{\code{\link{bsCollapsePanel}} elements to include in the Collapse.}
}
\description{
-Create a collapse that contains \code{\link{bsCollapsePanel}} elements.
-See \code{\link{Collapses}}
+\code{bsCollapse} is used in your UI to create a collapse panel group. Use
+\code{\link{bsCollapsePanel}} to populate this object with panels.
}
-\note{
-Run \code{bsDemo()} for a live examples of shinyBS functionality.
-}
-\examples{
-\dontrun{Run bsDemo() for examples}
+\details{
+See \link{Collapses} for more information about how to use \code{bsCollapse} with the
+rest of the Collapses family.
}
-\author{
-Eric Bailey
-}
-\references{
-\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+\note{
+Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
+of bsCollapse functionality
}
\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
Other Collapses: \code{\link{Collapses}};
\code{\link{bsCollapsePanel}};
\code{\link{updateCollapse}}
diff --git a/man/bsCollapsePanel.Rd b/man/bsCollapsePanel.Rd
index 31f3602..580f7f9 100644
--- a/man/bsCollapsePanel.Rd
+++ b/man/bsCollapsePanel.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
-% Please edit documentation in R/bsCollapse.R
+% Please edit documentation in R/bsCollapsePanel.R
\name{bsCollapsePanel}
\alias{bsCollapsePanel}
\title{bsCollapsePanel}
@@ -7,32 +7,28 @@
bsCollapsePanel(title, ..., value = title, style = NULL)
}
\arguments{
-\item{title}{The title to display at the top of the \code{bsCollapsePanel}}
+\item{title}{The title to display at the top of the panel.}
-\item{value}{The value that should be returned to the server when this
-\code{bsCollapsePanel} is open.}
+\item{value}{\bold{Optional} The value to return when this panel is open. Defaults to \code{title}.}
-\item{style}{A Bootstrap style to apply (\code{danger}, \code{warning}, \code{info}, or \code{success}.}
+\item{style}{\bold{Optional} A Bootstrap style to apply to the panel. (\code{primary}, \code{danger}, \code{warning}, \code{info}, or \code{success})}
-\item{\dots}{UI elements to include within the collapse panel}
+\item{\dots}{UI elements to include within the panel.}
}
\description{
-Create a collapse panel that can be included within a \code{\link{bsCollapse}}
-See \code{\link{Collapses}}
+\code{bsCollapsePanel} creates individual panels within a \code{\link{bsCollapse}} object.
}
-\note{
-Run \code{bsDemo()} for a live examples of shinyBS functionality.
-}
-\examples{
-\dontrun{Run bsDemo() for examples}
+\details{
+See \link{Collapses} for more information about how to use \code{bsCollapsePanel} with the
+rest of the Collapses family.
}
-\author{
-Eric Bailey
-}
-\references{
-\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+\note{
+Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
+of bsCollapsePanel functionality
}
\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
Other Collapses: \code{\link{Collapses}};
\code{\link{bsCollapse}}; \code{\link{updateCollapse}}
}
diff --git a/man/bsModal.Rd b/man/bsModal.Rd
new file mode 100644
index 0000000..8882180
--- /dev/null
+++ b/man/bsModal.Rd
@@ -0,0 +1,37 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsModal.R
+\name{bsModal}
+\alias{bsModal}
+\title{bsModal}
+\usage{
+bsModal(id, title, trigger, ..., size)
+}
+\arguments{
+\item{id}{A unique identifier for the modal window}
+
+\item{title}{The title to appear at the top of the modal}
+
+\item{trigger}{The id of a button or link that will open the modal.}
+
+\item{size}{\bold{Optional} What size should the modal be? (\code{small} or \code{large})}
+
+\item{\dots}{UI elements to include within the modal}
+}
+\description{
+\code{bsModal} is used within the UI to create a modal window.
+}
+\details{
+See \link{Modals} for more information about how to use \code{bsModal} with the
+rest of the Modals family.
+}
+\note{
+Run \code{example("Modals", "shinyBS", ask = FALSE)} for an example
+of bsModal functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Modals: \code{\link{Modals}};
+ \code{\link{toggleModal}}
+}
+
diff --git a/man/bsPopover.Rd b/man/bsPopover.Rd
new file mode 100644
index 0000000..a8f26c3
--- /dev/null
+++ b/man/bsPopover.Rd
@@ -0,0 +1,45 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsPopover.R
+\name{bsPopover}
+\alias{bsPopover}
+\title{bsPopover}
+\usage{
+bsPopover(id, title, content, placement = "bottom", trigger = "hover",
+ options = NULL)
+}
+\arguments{
+\item{id}{The id of the element to attach the popover to.}
+
+\item{title}{The title of the popover.}
+
+\item{content}{The main content of the popover.}
+
+\item{placement}{Where the popover should appear relative to its target
+(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
+
+\item{trigger}{What action should cause the popover to appear? (\code{hover},
+\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+
+\item{options}{A named list of additional options to be set on the popover.}
+}
+\description{
+\code{bsPopover} is used within the UI of an app to add a popover to a Shiny
+input or output.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{bsPopover} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
+of bsPopover functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addPopover}}; \code{\link{addTooltip}};
+ \code{\link{bsTooltip}}; \code{\link{removePopover}};
+ \code{\link{removeTooltip}}
+}
+
diff --git a/man/bsTooltip.Rd b/man/bsTooltip.Rd
new file mode 100644
index 0000000..c5ebd4d
--- /dev/null
+++ b/man/bsTooltip.Rd
@@ -0,0 +1,43 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsTooltip.R
+\name{bsTooltip}
+\alias{bsTooltip}
+\title{bsTooltip}
+\usage{
+bsTooltip(id, title, placement = "bottom", trigger = "hover",
+ options = NULL)
+}
+\arguments{
+\item{id}{The id of the element to attach the tooltip to.}
+
+\item{title}{The content of the tooltip.}
+
+\item{placement}{Where the tooltip should appear relative to its target
+(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
+
+\item{trigger}{What action should cause the tooltip to appear? (\code{hover},
+\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+
+\item{options}{A named list of additional options to be set on the tooltip.}
+}
+\description{
+\code{bsTooltip} is used within the UI of an app to add a tooltip to a Shiny
+input or output.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{bsTooltip} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
+of bsTooltip functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addPopover}}; \code{\link{addTooltip}};
+ \code{\link{bsPopover}}; \code{\link{removePopover}};
+ \code{\link{removeTooltip}}
+}
+
diff --git a/man/closeAlert.Rd b/man/closeAlert.Rd
new file mode 100644
index 0000000..0ba6798
--- /dev/null
+++ b/man/closeAlert.Rd
@@ -0,0 +1,32 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/closeAlert.R
+\name{closeAlert}
+\alias{closeAlert}
+\title{closeAlert}
+\usage{
+closeAlert(session, alertId)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{alertId}{\bold{Optional} A unique identifier for the Alert.}
+}
+\description{
+\code{closeAlert} is used within your Server logic to close an alert that you
+created with \code{\link{createAlert}}.
+}
+\details{
+See \link{Alerts} for more information about how to use \code{closeAlert} with the
+rest of the Alerts family.
+}
+\note{
+Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
+of closeAlert functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Alerts: \code{\link{Alerts}}; \code{\link{bsAlert}};
+ \code{\link{createAlert}}
+}
+
diff --git a/man/createAlert.Rd b/man/createAlert.Rd
new file mode 100644
index 0000000..9afacc5
--- /dev/null
+++ b/man/createAlert.Rd
@@ -0,0 +1,46 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/createAlert.R
+\name{createAlert}
+\alias{createAlert}
+\title{createAlert}
+\usage{
+createAlert(session, anchorId, alertId = NULL, title = NULL,
+ content = NULL, style = NULL, dismiss = TRUE, append = TRUE)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{anchorId}{The unique identifier of the anchor where the alert should be
+displayed.}
+
+\item{alertId}{\bold{Optional} A unique identifier for the Alert.}
+
+\item{title}{\bold{Optional} A title for the Alert.}
+
+\item{content}{The main body of the Alert. HTML tags are allowed.}
+
+\item{style}{A bootstrap style to apply. Defaults to \code{info}.}
+
+\item{dismiss}{\bold{logical} Should the Alert be user dismissable? Defaults to \code{TRUE}.}
+
+\item{append}{\code{logical} Should the Alert be appended below existing Alerts? Default to \code{TRUE}.}
+}
+\description{
+\code{createAlert} is used within the Server logic of your Shiny app to display
+an alert to the user.
+}
+\details{
+See \link{Alerts} for more information about how to use \code{createAlert} with the
+rest of the Alerts family.
+}
+\note{
+Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
+of createAlert functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Alerts: \code{\link{Alerts}}; \code{\link{bsAlert}};
+ \code{\link{closeAlert}}
+}
+
diff --git a/man/removePopover.Rd b/man/removePopover.Rd
new file mode 100644
index 0000000..9d2eaa7
--- /dev/null
+++ b/man/removePopover.Rd
@@ -0,0 +1,34 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/removePopover.R
+\name{removePopover}
+\alias{removePopover}
+\title{removePopover}
+\usage{
+removePopover(session, id)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{id}{The id of the element to remove the popover from.}
+}
+\description{
+\code{removePopover} is used within the Server logic of an app to remove an
+existing popover from a Shiny input or output.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{removePopover} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
+of removePopover functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addPopover}}; \code{\link{addTooltip}};
+ \code{\link{bsPopover}}; \code{\link{bsTooltip}};
+ \code{\link{removeTooltip}}
+}
+
diff --git a/man/removeTooltip.Rd b/man/removeTooltip.Rd
new file mode 100644
index 0000000..ae07e47
--- /dev/null
+++ b/man/removeTooltip.Rd
@@ -0,0 +1,34 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/removeTooltip.R
+\name{removeTooltip}
+\alias{removeTooltip}
+\title{removeTooltip}
+\usage{
+removeTooltip(session, id)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{id}{The id of the element to remove the tooltip from.}
+}
+\description{
+\code{removeTooltip} is used within the Server logic of an app to remove an
+existing tooltip from a Shiny input or output.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{removeTooltip} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
+of removeTooltip functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addPopover}}; \code{\link{addTooltip}};
+ \code{\link{bsPopover}}; \code{\link{bsTooltip}};
+ \code{\link{removePopover}}
+}
+
diff --git a/man/toggleModal.Rd b/man/toggleModal.Rd
new file mode 100644
index 0000000..b14a3f3
--- /dev/null
+++ b/man/toggleModal.Rd
@@ -0,0 +1,33 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/toggleModal.R
+\name{toggleModal}
+\alias{toggleModal}
+\title{toggleModal}
+\usage{
+toggleModal(session, modalId, toggle = "toggle")
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{modalId}{The id of the modal window you want to open/close}
+
+\item{toggle}{Should the modal window \code{open}, \code{close}, or \code{toggle}?}
+}
+\description{
+\code{toggleModal} is used within your Server logic to open or close a modal
+window.
+}
+\details{
+See \link{Modals} for more information about how to use \code{toggleModal} with the
+rest of the Modals family.
+}
+\note{
+Run \code{example("Modals", "shinyBS", ask = FALSE)} for an example
+of toggleModal functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Modals: \code{\link{Modals}}; \code{\link{bsModal}}
+}
+
diff --git a/man/updateCollapse.Rd b/man/updateCollapse.Rd
index bc1741b..96ca783 100644
--- a/man/updateCollapse.Rd
+++ b/man/updateCollapse.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
-% Please edit documentation in R/bsCollapse.R
+% Please edit documentation in R/updateCollapse.R
\name{updateCollapse}
\alias{updateCollapse}
\title{updateCollapse}
@@ -7,37 +7,36 @@
updateCollapse(session, id, open = NULL, close = NULL, style = NULL)
}
\arguments{
-\item{session}{The \code{session} object passed to function given to
-\code{shinyServer}.}
+\item{session}{The session object passed to function given to shinyServer.}
-\item{id}{The id of the \code{\link{bsCollapse}} object you want to change.}
+\item{id}{The id of the Collapse object you want to change.}
-\item{open}{A vector of \code{value} (or \code{title} if no \code{value} was provided)
-of the \code{\link{bsCollapsePanel}} elements you want to open.}
+\item{open}{A vector of \code{value} (or \code{title} if no \code{value} was
+provided) values identifying the panels you want to open.}
-\item{close}{A vector of \code{value} (or \code{title} if no \code{value} was provided)
-of the \code{\link{bsCollapsePanel}} elements you want to close.}
+\item{close}{A vector of \code{value} (or \code{title} if no \code{value} was
+provided) values identifying the panels you want to close.}
-\item{style}{A named list of Bootstrap styles (danger, info, warning, success, default).
-The names should correspond the the \code{value} of the \code{\link{bsCollapsePanel}} you
-want to change.}
+\item{style}{A named list of Bootstrap styles (\code{primary}, \code{danger}, \code{info},
+\code{warning}, \code{success}, or \code{default}). The names should correspond
+to the \code{value} (or \code{title} if no \code{value} was provided) of the
+\code{\link{bsCollapsePanel}} you want to change.}
}
\description{
-Open or close collapse panels or change their styles. See \code{\link{Collapses}}
+\code{updateCollapse} is used within the Server logic of your Shiny app to
+modify a Collapse after load.
}
-\note{
-Run \code{bsDemo()} for a live examples of shinyBS functionality.
-}
-\examples{
-\dontrun{Run bsDemo() for examples}
+\details{
+See \link{Collapses} for more information about how to use \code{updateCollapse} with the
+rest of the Collapses family.
}
-\author{
-Eric Bailey
-}
-\references{
-\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+\note{
+Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
+of updateCollapse functionality
}
\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
Other Collapses: \code{\link{Collapses}};
\code{\link{bsCollapsePanel}}; \code{\link{bsCollapse}}
}
From dcead640fe854721b7911e37935bc268dc4027f8 Mon Sep 17 00:00:00 2001
From: Eric
Date: Fri, 6 Mar 2015 11:59:47 -0500
Subject: [PATCH 61/89] added Buttons
---
NAMESPACE | 2 +
R/Buttons.R | 111 ++++++++++++++++++++++++++++++++++++++
R/bsButton.R | 56 ++++++++++++++++++++
R/updateButton.R | 37 +++++++++++++
inst/www/shinyBS.js | 79 +++++++++++++++++++++++++++
man/Buttons.Rd | 126 ++++++++++++++++++++++++++++++++++++++++++++
man/bsButton.Rd | 54 +++++++++++++++++++
man/updateButton.Rd | 53 +++++++++++++++++++
shinyBS.Rproj | 1 +
9 files changed, 519 insertions(+)
create mode 100644 R/Buttons.R
create mode 100644 R/bsButton.R
create mode 100644 R/updateButton.R
create mode 100644 man/Buttons.Rd
create mode 100644 man/bsButton.Rd
create mode 100644 man/updateButton.Rd
diff --git a/NAMESPACE b/NAMESPACE
index a78d51b..be22d7c 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -3,6 +3,7 @@
export(addPopover)
export(addTooltip)
export(bsAlert)
+export(bsButton)
export(bsCollapse)
export(bsCollapsePanel)
export(bsModal)
@@ -13,4 +14,5 @@ export(createAlert)
export(removePopover)
export(removeTooltip)
export(toggleModal)
+export(updateButton)
export(updateCollapse)
diff --git a/R/Buttons.R b/R/Buttons.R
new file mode 100644
index 0000000..8667ab3
--- /dev/null
+++ b/R/Buttons.R
@@ -0,0 +1,111 @@
+#'Buttons
+#'
+#'Twitter Bootstrap gives many options for styling buttons that aren't made
+#'available by standard Shiny. Use shinyBS to create buttons of different sizes,
+#'shapes, and colors.
+#'
+#'@section Components:
+#'There are two functions in the Buttons family:
+#' \describe{
+#' \item{\code{\link{bsButton}}}{Used in the UI to create a button. Buttons
+#' can be of the type \code{action} or \code{toggle}.}
+#' \item{\code{\link{updateButton}}}{Used in the Server logic to modify the
+#' state of a button created with \code{\link{bsButton}}}
+#' }
+#'
+#'@details
+#'Create a button in the UI with \code{\link{bsButton}}. If \code{type = "action"}
+#'the button will behave like the standard \code{\link{actionButton}} in shiny.
+#'If \code{type = "toggle"} the button will behave like a \code{\link{checkboxInput}}
+#'with an on and off state. It will return \code{TRUE} or \code{FALSE} to the Server
+#'depending on its state.
+#'
+#'You can update the style and state of a \code{\link{bsButton}} from the Server
+#'logic with \code{\link{updateButton}}. For example, a button could be set to
+#'\code{disabled = TRUE} until the user has made some other selections, then once
+#'those selections have been made, an observer on the Server could use \code{\link{updateButton}}
+#'to enable the button allowing the user to proceed. Alternatively, you could set
+#'the button to \code{style = "success"} to let them know that the button is ready
+#'to be clicked.
+#'
+#'@section Changes:
+#'\code{bsActionButton} and \code{bsToggleButton} were replaced with just
+#'\code{\link{bsButton}} with a \code{type} argument.
+#'
+#'\code{icon} was added to allow placing an icon in the button.
+#'
+#'@examples
+#'\donttest{
+#'library(shiny)
+#'library(shinyBS)
+#'shinyApp(
+#' ui = fluidPage(
+#' sidebarLayout(
+#' sidebarPanel(
+#' sliderInput("bins",
+#' "Move the slider to see its effect on the button below:",
+#' min = 1,
+#' max = 50,
+#' value = 1),
+#' bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
+#' tags$p("Clicking the first button below changes the disabled state of the second button."),
+#' bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
+#' bsButton("actOne", label = "Block Action Button", block = TRUE)
+#'
+#' ),
+#' mainPanel(
+#' textOutput("exampleText")
+#' )
+#' )
+#' ),
+#' server = function(input, output, session) {
+#' observeEvent(input$togOne, ({
+#' updateButton(session, "actOne", disabled = !input$togOne)
+#' }))
+#' observeEvent(input$bins, ({
+#'
+#' b <- input$bins
+#' disabled = NULL
+#' style = "default"
+#' icon = ""
+#'
+#' if(b < 5) {
+#' disabled = TRUE
+#' icon <- icon("ban")
+#' } else {
+#' disabled = FALSE
+#' }
+#'
+#' if(b < 15 | b > 35) {
+#' style = "danger"
+#' } else if(b < 20 | b > 30) {
+#' style = "warning"
+#' } else {
+#' style = "default"
+#' icon = icon("check")
+#' }
+#'
+#' updateButton(session, "actTwo", disabled = disabled, style = style, icon = icon)
+#'
+#' }))
+#'
+#' output$exampleText <- renderText({
+#' input$actTwo
+#' b <- isolate(input$bins)
+#' txt = ""
+#' if((b > 5 & b < 15) | b > 35) {
+#' txt = "That was dangerous."
+#' } else if((b > 5 & b < 20) | b > 30) {
+#' txt = "I warned you about that."
+#' } else if(b >= 20 & b <= 30) {
+#' txt = "You have choosen... wisely."
+#' }
+#' return(txt)
+#' })
+#' }
+#')
+#'}
+#'@templateVar item_name Buttons
+#'@templateVar family_name Buttons
+#'@template footer
+NULL
\ No newline at end of file
diff --git a/R/bsButton.R b/R/bsButton.R
new file mode 100644
index 0000000..f42ebc3
--- /dev/null
+++ b/R/bsButton.R
@@ -0,0 +1,56 @@
+#'bsButton
+#'
+#'\code{bsButton} is used in your UI script to create customizable action and toggle
+#'buttons.
+#'
+#'@inheritParams shiny::actionButton
+#'@param style A Bootstrap style to apply to the button. (\code{default}, \code{primary},
+#'\code{success}, \code{info}, \code{warning}, or \code{danger})
+#'@param size The size of the button (\code{extra-small}, \code{small},
+#'\code{default}, or \code{large})
+#'@param type The type of button to create. (\code{action} or \code{toggle})
+#'@param block \bold{logical} Should the button take the full width of the parent element?
+#'@param disabled \bold{logical} Should the button be disabled (un-clickable)?
+#'@param value \bold{logical} If \code{type = "toggle"}, the initial value of the button.
+#'
+#'@templateVar item_name bsButton
+#'@templateVar family_name Buttons
+#'@template item_details
+#'@template footer
+#'@export
+bsButton <- function(inputId, label, icon = NULL, ..., style = "default",
+ size = "default", type = "action", block = FALSE,
+ disabled = FALSE, value = FALSE) {
+ btn <- actionButton(inputId, label, icon, ...)
+ if(type == "toggle") {
+ btn <- removeClass(btn, "action-button")
+ btn <- addClass(btn, "sbs-toggle-button")
+ if(value == TRUE) {
+ btn <- addClass(btn, "active")
+ }
+ }
+ if(style != "default") {
+ btn <- removeClass(btn, "btn-default")
+ btn <- addClass(btn, paste0("btn-", style))
+ }
+
+ size <- switch(size,
+ "extra-small" = "btn-xs",
+ "small" = "btn-sm",
+ "large" = "btn-lg",
+ "default")
+
+ if(size != "default") {
+ btn <- addClass(btn, size)
+ }
+
+ if(block == TRUE) {
+ btn <- addClass(btn, "btn-block")
+ }
+ if(disabled) {
+ btn <- addAttribs(btn, disabled = "disabled")
+ }
+
+ htmltools::attachDependencies(btn, shinyBSDep)
+
+}
\ No newline at end of file
diff --git a/R/updateButton.R b/R/updateButton.R
new file mode 100644
index 0000000..03f0c78
--- /dev/null
+++ b/R/updateButton.R
@@ -0,0 +1,37 @@
+#'updateButton
+#'
+#'\code{updateButton} is used in your Server logic to update the style or state
+#'of a button.
+#'
+#'@inheritParams bsButton
+#'@param session The session object passed to function given to shinyServer.
+#'
+#'@details Because of the way it is coded, \code{updateButton} may work on buttons not
+#'created by \code{\link{bsButton}} such as \code{\link{submitButton}}.
+#'
+#'See \code{\link{Buttons}} for more information about how to use \code{updateButton} with the rest of the Buttons family.
+#'
+#'@templateVar item_name updateButton
+#'@templateVar family_name Buttons
+#'@template item_details
+#'@template footer
+#'@export
+updateButton <- function(session, inputId, label = NULL, icon = NULL, value = NULL, style = NULL,
+ size = NULL, block = NULL, disabled = NULL) {
+
+ if(!is.null(icon)) icon <- as.character(icon)
+
+ if(!is.null(size)) {
+ size <- switch(size,
+ "extra-small" = "btn-xs",
+ "small" = "btn-sm",
+ "large" = "btn-lg",
+ "default" = "default")
+ }
+
+ data <- dropNulls(list(id = inputId, label = label, icon = icon, value = value, style = style,
+ size = size, block = block, disabled = disabled))
+
+ session$sendCustomMessage("bsButtonUpdate", data)
+
+}
\ No newline at end of file
diff --git a/inst/www/shinyBS.js b/inst/www/shinyBS.js
index 5ca6e1c..78f8cfe 100644
--- a/inst/www/shinyBS.js
+++ b/inst/www/shinyBS.js
@@ -1,5 +1,25 @@
var shinyBS = {inputBindings: {}};
+shinyBS.inputBindings.toggle = new Shiny.InputBinding();
+$.extend(shinyBS.inputBindings.toggle, {
+ find: function(scope) {
+ return $(scope).find(".sbs-toggle-button");
+ },
+ getValue: function(el) {
+ return $(el).hasClass("active");
+ },
+ subscribe: function(el, callback) {
+ $(el).on("click", function(e) {
+ $(el).toggleClass("active").blur();
+ callback();
+ })
+ },
+ unsubscribe: function(el) {
+ $(el).off("click");
+ }
+});
+Shiny.inputBindings.register(shinyBS.inputBindings.toggle)
+
shinyBS.inputBindings.modal = new Shiny.InputBinding();
$.extend(shinyBS.inputBindings.modal, {
find: function(scope) {
@@ -204,3 +224,62 @@ Shiny.addCustomMessageHandler("updateTooltipOrPopover", function(data) {
shinyBS.removeTooltip(data.id, data.type)
}
})
+
+Shiny.addCustomMessageHandler("bsButtonUpdate", function(data) {
+
+ var btn = $("button#" + data.id);
+ var ico = btn.find("i");
+
+ if(ico.length > 0) {
+ ico = ico[0].outerHTML;
+ } else {
+ ico = "";
+ };
+
+ if(data.hasOwnProperty("label")) {
+ btn.html(ico + data.label);
+ };
+
+ if(data.hasOwnProperty("icon")) {
+ var ch = btn.children();
+ if(ch.length == 0) {
+ btn.prepend(data.icon);
+ } else {
+ btn.find("i").replaceWith(data.icon);
+ };
+ };
+
+ if(data.hasOwnProperty("value")) {
+ if(btn.hasClass("sbs-toggle-button")) {
+ if(data.value != btn.hasClass("active")) {
+ btn.trigger("click");
+ };
+ };
+ };
+
+ if(data.hasOwnProperty("style")) {
+ btn
+ .removeClass("btn-default btn-primary btn-success btn-info btn-warning btn-danger btn-link")
+ .addClass("btn-" + data.style);
+ };
+
+ if(data.hasOwnProperty("size")) {
+ btn.removeClass("btn-lg btn-sm btn-xs")
+ if(data.size != "default") {
+ btn.addClass(data.size);
+ };
+ };
+
+ if(data.hasOwnProperty("block")) {
+ btn.toggleClass("btn-block", data.block);
+ };
+
+ if(data.hasOwnProperty("disabled")) {
+ if(data.disabled) {
+ btn.attr("disabled", "disabled")
+ } else {
+ btn.attr("disabled", false)
+ };
+ };
+
+})
\ No newline at end of file
diff --git a/man/Buttons.Rd b/man/Buttons.Rd
new file mode 100644
index 0000000..a2e35a3
--- /dev/null
+++ b/man/Buttons.Rd
@@ -0,0 +1,126 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/Buttons.R
+\name{Buttons}
+\alias{Buttons}
+\title{Buttons}
+\description{
+Twitter Bootstrap gives many options for styling buttons that aren't made
+available by standard Shiny. Use shinyBS to create buttons of different sizes,
+shapes, and colors.
+}
+\details{
+Create a button in the UI with \code{\link{bsButton}}. If \code{type = "action"}
+the button will behave like the standard \code{\link{actionButton}} in shiny.
+If \code{type = "toggle"} the button will behave like a \code{\link{checkboxInput}}
+with an on and off state. It will return \code{TRUE} or \code{FALSE} to the Server
+depending on its state.
+
+You can update the style and state of a \code{\link{bsButton}} from the Server
+logic with \code{\link{updateButton}}. For example, a button could be set to
+\code{disabled = TRUE} until the user has made some other selections, then once
+those selections have been made, an observer on the Server could use \code{\link{updateButton}}
+to enable the button allowing the user to proceed. Alternatively, you could set
+the button to \code{style = "success"} to let them know that the button is ready
+to be clicked.
+}
+\note{
+Run \code{example("Buttons", "shinyBS", ask = FALSE)} for an example
+of Buttons functionality
+}
+\section{Components}{
+
+There are two functions in the Buttons family:
+ \describe{
+ \item{\code{\link{bsButton}}}{Used in the UI to create a button. Buttons
+ can be of the type \code{action} or \code{toggle}.}
+ \item{\code{\link{updateButton}}}{Used in the Server logic to modify the
+ state of a button created with \code{\link{bsButton}}}
+ }
+}
+
+\section{Changes}{
+
+\code{bsActionButton} and \code{bsToggleButton} were replaced with just
+\code{\link{bsButton}} with a \code{type} argument.
+
+\code{icon} was added to allow placing an icon in the button.
+}
+\examples{
+\donttest{
+library(shiny)
+library(shinyBS)
+shinyApp(
+ ui = fluidPage(
+ sidebarLayout(
+ sidebarPanel(
+ sliderInput("bins",
+ "Move the slider to see its effect on the button below:",
+ min = 1,
+ max = 50,
+ value = 1),
+ bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
+ tags$p("Clicking the first button below changes the disabled state of the second button."),
+ bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
+ bsButton("actOne", label = "Block Action Button", block = TRUE)
+
+ ),
+ mainPanel(
+ textOutput("exampleText")
+ )
+ )
+ ),
+ server = function(input, output, session) {
+ observeEvent(input$togOne, ({
+ updateButton(session, "actOne", disabled = !input$togOne)
+ }))
+ observeEvent(input$bins, ({
+
+ b <- input$bins
+ disabled = NULL
+ style = "default"
+ icon = ""
+
+ if(b < 5) {
+ disabled = TRUE
+ icon <- icon("ban")
+ } else {
+ disabled = FALSE
+ }
+
+ if(b < 15 | b > 35) {
+ style = "danger"
+ } else if(b < 20 | b > 30) {
+ style = "warning"
+ } else {
+ style = "default"
+ icon = icon("check")
+ }
+
+ updateButton(session, "actTwo", disabled = disabled, style = style, icon = icon)
+
+ }))
+
+ output$exampleText <- renderText({
+ input$actTwo
+ b <- isolate(input$bins)
+ txt = ""
+ if((b > 5 & b < 15) | b > 35) {
+ txt = "That was dangerous."
+ } else if((b > 5 & b < 20) | b > 30) {
+ txt = "I warned you about that."
+ } else if(b >= 20 & b <= 30) {
+ txt = "You have choosen... wisely."
+ }
+ return(txt)
+ })
+ }
+)
+}
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Buttons: \code{\link{bsButton}};
+ \code{\link{updateButton}}
+}
+
diff --git a/man/bsButton.Rd b/man/bsButton.Rd
new file mode 100644
index 0000000..3d9a3a9
--- /dev/null
+++ b/man/bsButton.Rd
@@ -0,0 +1,54 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsButton.R
+\name{bsButton}
+\alias{bsButton}
+\title{bsButton}
+\usage{
+bsButton(inputId, label, icon = NULL, ..., style = "default",
+ size = "default", type = "action", block = FALSE, disabled = FALSE,
+ value = FALSE)
+}
+\arguments{
+\item{inputId}{Specifies the input slot that will be used to access the
+value.}
+
+\item{label}{The contents of the button or link--usually a text label, but
+you could also use any other HTML, like an image.}
+
+\item{icon}{An optional \code{\link{icon}} to appear on the button.}
+
+\item{...}{Named attributes to be applied to the button or link.}
+
+\item{style}{A Bootstrap style to apply to the button. (\code{default}, \code{primary},
+\code{success}, \code{info}, \code{warning}, or \code{danger})}
+
+\item{size}{The size of the button (\code{extra-small}, \code{small},
+\code{default}, or \code{large})}
+
+\item{type}{The type of button to create. (\code{action} or \code{toggle})}
+
+\item{block}{\bold{logical} Should the button take the full width of the parent element?}
+
+\item{disabled}{\bold{logical} Should the button be disabled (un-clickable)?}
+
+\item{value}{\bold{logical} If \code{type = "toggle"}, the initial value of the button.}
+}
+\description{
+\code{bsButton} is used in your UI script to create customizable action and toggle
+buttons.
+}
+\details{
+See \link{Buttons} for more information about how to use \code{bsButton} with the
+rest of the Buttons family.
+}
+\note{
+Run \code{example("Buttons", "shinyBS", ask = FALSE)} for an example
+of bsButton functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Buttons: \code{\link{Buttons}};
+ \code{\link{updateButton}}
+}
+
diff --git a/man/updateButton.Rd b/man/updateButton.Rd
new file mode 100644
index 0000000..8579351
--- /dev/null
+++ b/man/updateButton.Rd
@@ -0,0 +1,53 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/updateButton.R
+\name{updateButton}
+\alias{updateButton}
+\title{updateButton}
+\usage{
+updateButton(session, inputId, label = NULL, icon = NULL, value = NULL,
+ style = NULL, size = NULL, block = NULL, disabled = NULL)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{inputId}{Specifies the input slot that will be used to access the
+value.}
+
+\item{label}{The contents of the button or link--usually a text label, but
+you could also use any other HTML, like an image.}
+
+\item{icon}{An optional \code{\link{icon}} to appear on the button.}
+
+\item{value}{\bold{logical} If \code{type = "toggle"}, the initial value of the button.}
+
+\item{style}{A Bootstrap style to apply to the button. (\code{default}, \code{primary},
+\code{success}, \code{info}, \code{warning}, or \code{danger})}
+
+\item{size}{The size of the button (\code{extra-small}, \code{small},
+\code{default}, or \code{large})}
+
+\item{block}{\bold{logical} Should the button take the full width of the parent element?}
+
+\item{disabled}{\bold{logical} Should the button be disabled (un-clickable)?}
+}
+\description{
+\code{updateButton} is used in your Server logic to update the style or state
+of a button.
+}
+\details{
+Because of the way it is coded, \code{updateButton} may work on buttons not
+created by \code{\link{bsButton}} such as \code{\link{submitButton}}.
+
+See \code{\link{Buttons}} for more information about how to use \code{updateButton} with the rest of the Buttons family.
+}
+\note{
+Run \code{example("Buttons", "shinyBS", ask = FALSE)} for an example
+of updateButton functionality
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Buttons: \code{\link{Buttons}};
+ \code{\link{bsButton}}
+}
+
diff --git a/shinyBS.Rproj b/shinyBS.Rproj
index eaa6b81..584b854 100644
--- a/shinyBS.Rproj
+++ b/shinyBS.Rproj
@@ -15,4 +15,5 @@ LaTeX: pdfLaTeX
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
+PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace
From f2a325b961a8c49cd9be2f289b048e8b760f9669 Mon Sep 17 00:00:00 2001
From: Eric
Date: Fri, 6 Mar 2015 15:43:58 -0500
Subject: [PATCH 62/89] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 009b579..e56e8ec 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ packages that give users access to this functionality.
I have most of the functionality that I intend to release with shinyBS 0.50
working now and am now working primarily on testing and documentation. I hope
-to have the new version on CRAN by the end of February 2015.
+to have the new version on CRAN in the first half of March 2015.
Features that will remain in version 0.5 include:
From cc2295ecbbbd20b273b9c05de0aad4f22b457bb4 Mon Sep 17 00:00:00 2001
From: Eric
Date: Fri, 6 Mar 2015 15:45:15 -0500
Subject: [PATCH 63/89] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index e56e8ec..2d871ca 100644
--- a/README.md
+++ b/README.md
@@ -30,15 +30,15 @@ Features that will remain in version 0.5 include:
* Tooltips
* Popovers
* Modal Windows
-* Progress Bars
* Collapse Panels
* Button upgrades
-* Button Groups
Features that will not be included in version 0.5 include:
* Navbars and related components
* Typeaheads
+* Progress Bars
+* Button Groups
Sorry for any inconvenience,
From dd034045d3b119d8c28b5441bdf4252c98fdd933 Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 10 Mar 2015 08:31:02 -0400
Subject: [PATCH 64/89] Fixed Collapse issue from Nathan
---
R/bsCollapse.R | 2 +-
inst/www/shinyBS.js | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/R/bsCollapse.R b/R/bsCollapse.R
index 8dc1ec8..2339e94 100644
--- a/R/bsCollapse.R
+++ b/R/bsCollapse.R
@@ -35,7 +35,7 @@ bsCollapse <- function(..., id = NULL, multiple = FALSE, open = NULL) {
}
}
- bsTag <- shiny::tags$div(class = "panel-group sbs-panel-group", id=id, role = "tablist", panels)
+ bsTag <- shiny::tags$div(class = "panel-group sbs-panel-group", "data-sbs-multi" = multiple, id=id, role = "tablist", panels)
htmltools::attachDependencies(bsTag, shinyBSDep)
diff --git a/inst/www/shinyBS.js b/inst/www/shinyBS.js
index 78f8cfe..bd15ded 100644
--- a/inst/www/shinyBS.js
+++ b/inst/www/shinyBS.js
@@ -102,13 +102,19 @@ $.extend(shinyBS.inputBindings.collapse, {
},
initialize: function(el) {
var $el = $(el);
- var $panels = $el.find(".panel");
+ var $panels = $el.children(".panel");
var val = [];
$panels.each(function(i) {
- if($(this).find("div.panel-collapse.collapse").hasClass("in")) {
+ if($(this).children("div.panel-collapse.collapse").hasClass("in")) {
val.push($(this).attr("value"));
}
- $(this).find("div.panel-collapse.collapse").collapse({parent: "#" + $el.attr("id"), toggle: false});
+ var $pan = $(this).children("div.panel-collapse.collapse");
+ if($el.attr("data-sbs-multi") == "FALSE") {
+ var par = "#" + $el.attr("id");
+ } else {
+ var par = false;
+ }
+ $pan.collapse({parent: par, toggle: false});
});
$el.data("sbs-value", val);
$panels.on("show.bs.collapse", function(event) {
From aa00e4bf34a7c53644311ef0661866ff2774c86e Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 10 Mar 2015 15:21:27 -0400
Subject: [PATCH 65/89] blah
---
.gitignore | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 2562982..904c456 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.Rproj.user
.Rhistory
.RData
-README.html
\ No newline at end of file
+README.html
+docs/Alerts2.html
\ No newline at end of file
From 0bae19eb8928b6ab8dcfc157acce10d9e0b4dad2 Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 11 Mar 2015 12:27:48 -0400
Subject: [PATCH 66/89] documentWriter
---
inst/docgen/component.txt | 10 +++
inst/docgen/docWriter.R | 133 +++++++++++++++++++++++++++++++
inst/docgen/document.txt | 161 ++++++++++++++++++++++++++++++++++++++
inst/docgen/parameter.txt | 2 +
4 files changed, 306 insertions(+)
create mode 100644 inst/docgen/component.txt
create mode 100644 inst/docgen/docWriter.R
create mode 100644 inst/docgen/document.txt
create mode 100644 inst/docgen/parameter.txt
diff --git a/inst/docgen/component.txt b/inst/docgen/component.txt
new file mode 100644
index 0000000..e5b3d29
--- /dev/null
+++ b/inst/docgen/component.txt
@@ -0,0 +1,10 @@
+
+ <%=name %>
+ <%=description %>
+ Usage
+ <%=usage %>
+ Parameters
+
+ <%=params %>
+
+
diff --git a/inst/docgen/docWriter.R b/inst/docgen/docWriter.R
new file mode 100644
index 0000000..5160acc
--- /dev/null
+++ b/inst/docgen/docWriter.R
@@ -0,0 +1,133 @@
+library(tools)
+
+family <- "Alerts"
+functions <- c("bsAlert", "createAlert", "closeAlert")
+path <- "C:/R/shinyBS"
+
+createDocPage <- function(con = stdout(), family, functions, path = "C:/R/shinyBS") {
+
+ components <- c()
+ componentNav <- c()
+
+ writeDesc <- function(desc = Rd$description) {
+
+ html <- list("\\code" = "code", "\\bold" = "strong")
+
+ inPara <- FALSE
+ tags <- tools:::RdTags(desc)
+ i <- 1
+ op <- ""
+ while(i <= length(desc)) {
+ if(tags[i] == "TEXT") {
+ if(tags[i] == "\n") {
+ if(inPara) {
+ op <- paste0(op, "\n")
+ inPara <- FALSE
+ }
+ op <- paste0(op, "\n")
+ inPara <- TRUE
+ } else {
+ op <- paste0(op, desc[[i]])
+ }
+ } else if(tags[i] %in% names(html)) {
+ otag <- paste0("<", html[[tags[i]]], ">")
+ ctag <- paste0("", html[[tags[i]]], ">")
+ op <- paste0(op, otag, desc[[i]], ctag)
+ }
+ i = i + 1
+ }
+
+ return(op)
+
+ }
+
+ writeArgs <- function(args) {
+
+ args <- args[tools:::RdTags(args) == "\\item"]
+ template <- readLines("C:/R/shinyBS/inst/docgen/parameter.txt")
+ op <- c()
+
+ i <- 1
+ while(i <= length(args)) {
+
+ arg <- args[[i]]
+ item <- unlist(arg[[1]])
+ def <- writeDesc(arg[[2]])
+
+ arg <- gsub("<%=param %>", item, template, fixed = TRUE)
+ arg <- gsub("<%=def %>", def, arg, fixed = TRUE)
+
+ op <- c(op, arg)
+
+ i = i + 1
+
+ }
+
+ return(paste0(op, collapse = "\n"))
+
+ }
+
+ name_Rd <- function(Rd) {
+ tags <- tools:::RdTags(Rd)
+ for(i in seq(length(tags))) {
+ if(tags[i] != "\\section") {
+ n <- gsub("\\", "", tags[i], fixed = TRUE)
+ } else {
+ n <- unlist(Rd[[i]][[1L]])
+ Rd[[i]] <- Rd[[i]][[2L]]
+ }
+ names(Rd)[i] <- n
+ }
+ return(Rd)
+ }
+
+ writeName <- function(Rd) {
+ unlist(Rd$name)
+ }
+
+ writeExample <- function(ex) {
+ ex <- ex[[2]]
+ ex <- paste0(ex, collapse = "")
+ return(ex)
+ }
+
+ component_template <- readLines("C:/R/shinyBS/inst/docgen/component.txt")
+
+ for(fn in functions) {
+
+ componentNav <- c(componentNav, paste0("
", fn, " "))
+
+ infile <- file.path(path, "man", paste0(fn, ".Rd"))
+ Rd <- name_Rd(tools:::prepare_Rd(parse_Rd(infile, verbose = FALSE)))
+
+ comp <- gsub("<%=name %>", writeName(Rd), component_template, fixed = TRUE)
+ comp <- gsub("<%=description %>", writeDesc(Rd$description), comp, fixed = TRUE)
+ comp <- gsub("<%=usage %>", paste0(unlist(Rd$usage[-1]), collapse = ""), comp, fixed = TRUE)
+ comp <- gsub("<%=params %>", writeArgs(Rd$arguments), comp, fixed = TRUE)
+
+ components <- c(components, comp)
+
+ }
+
+ componentNav <- paste0(componentNav, collapse = "\n")
+ components <- paste0(components, collapse = "\n")
+
+ infile <- file.path(path, "man", paste0(family, ".Rd"))
+ Rd <- name_Rd(tools:::prepare_Rd(parse_Rd(infile, verbose = FALSE)))
+
+ template <- readLines("C:/R/shinyBS/inst/docgen/document.txt")
+
+ ex <- writeExample(Rd$examples)
+
+ template <- gsub("<%=family %>", writeName(Rd), template, fixed = TRUE)
+ template <- gsub("<%=componentnav %>", componentNav, template, fixed = TRUE)
+ template <- gsub("<%=familydescription %>", writeDesc(Rd$description), template, fixed = TRUE)
+ template <- gsub("<%=familydetails %>", writeDesc(Rd$details), template, fixed = TRUE)
+ template <- gsub("<%=components %>", components, template, fixed = TRUE)
+ template <- gsub("<%=changes %>", writeDesc(Rd$Changes), template, fixed = TRUE)
+ template <- gsub("<%=example %>", writeExample(Rd$examples), template, fixed = TRUE)
+
+ writeLines(template, con)
+
+}
+
\ No newline at end of file
diff --git a/inst/docgen/document.txt b/inst/docgen/document.txt
new file mode 100644
index 0000000..4956f76
--- /dev/null
+++ b/inst/docgen/document.txt
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+ shinyBS: <%=family %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Alerts
+
+ Description
+ <%=familydescription %>
+
+
+ Details
+ <%=familydetails %>
+
+
+ Components
+ <%=components %>
+
+
+ Changes
+ <%=changes %>
+
+
+
+
+ Example
+
+
+
+
+
+
+
+<%=example %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/inst/docgen/parameter.txt b/inst/docgen/parameter.txt
new file mode 100644
index 0000000..19b3b15
--- /dev/null
+++ b/inst/docgen/parameter.txt
@@ -0,0 +1,2 @@
+<%=param %>
+<%=def %>
From 6aeffc4e89683a017316eeaf706f7c9041b6db94 Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 11 Mar 2015 13:21:35 -0400
Subject: [PATCH 67/89] docWriter Tweaks
---
inst/docgen/docWriter.R | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/inst/docgen/docWriter.R b/inst/docgen/docWriter.R
index 5160acc..262c05b 100644
--- a/inst/docgen/docWriter.R
+++ b/inst/docgen/docWriter.R
@@ -4,6 +4,10 @@ family <- "Alerts"
functions <- c("bsAlert", "createAlert", "closeAlert")
path <- "C:/R/shinyBS"
+family <- "Modals"
+functions <- c("bsModal", "toggleModal")
+
+
createDocPage <- function(con = stdout(), family, functions, path = "C:/R/shinyBS") {
components <- c()
@@ -52,6 +56,8 @@ createDocPage <- function(con = stdout(), family, functions, path = "C:/R/shinyB
arg <- args[[i]]
item <- unlist(arg[[1]])
+
+ if(is.null(item)) item = "..."
def <- writeDesc(arg[[2]])
arg <- gsub("<%=param %>", item, template, fixed = TRUE)
@@ -130,4 +136,6 @@ createDocPage <- function(con = stdout(), family, functions, path = "C:/R/shinyB
writeLines(template, con)
}
+
+createDocPage("test.html", family, functions, path)
\ No newline at end of file
From fe630b8b0c27ea9db5a590a2f4baf60da9bacbe1 Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 11 Mar 2015 14:27:11 -0400
Subject: [PATCH 68/89] separated docgen
---
R/{Collapse.R => Collapses.R} | 0
R/{Tooltips.R => Tooltips_and_Popovers.R} | 0
inst/docgen/component.txt | 10 --
inst/docgen/docWriter.R | 141 -------------------
inst/docgen/document.txt | 161 ----------------------
inst/docgen/parameter.txt | 2 -
6 files changed, 314 deletions(-)
rename R/{Collapse.R => Collapses.R} (100%)
rename R/{Tooltips.R => Tooltips_and_Popovers.R} (100%)
delete mode 100644 inst/docgen/component.txt
delete mode 100644 inst/docgen/docWriter.R
delete mode 100644 inst/docgen/document.txt
delete mode 100644 inst/docgen/parameter.txt
diff --git a/R/Collapse.R b/R/Collapses.R
similarity index 100%
rename from R/Collapse.R
rename to R/Collapses.R
diff --git a/R/Tooltips.R b/R/Tooltips_and_Popovers.R
similarity index 100%
rename from R/Tooltips.R
rename to R/Tooltips_and_Popovers.R
diff --git a/inst/docgen/component.txt b/inst/docgen/component.txt
deleted file mode 100644
index e5b3d29..0000000
--- a/inst/docgen/component.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-
- <%=name %>
- <%=description %>
- Usage
- <%=usage %>
- Parameters
-
- <%=params %>
-
-
diff --git a/inst/docgen/docWriter.R b/inst/docgen/docWriter.R
deleted file mode 100644
index 262c05b..0000000
--- a/inst/docgen/docWriter.R
+++ /dev/null
@@ -1,141 +0,0 @@
-library(tools)
-
-family <- "Alerts"
-functions <- c("bsAlert", "createAlert", "closeAlert")
-path <- "C:/R/shinyBS"
-
-family <- "Modals"
-functions <- c("bsModal", "toggleModal")
-
-
-createDocPage <- function(con = stdout(), family, functions, path = "C:/R/shinyBS") {
-
- components <- c()
- componentNav <- c()
-
- writeDesc <- function(desc = Rd$description) {
-
- html <- list("\\code" = "code", "\\bold" = "strong")
-
- inPara <- FALSE
- tags <- tools:::RdTags(desc)
- i <- 1
- op <- ""
- while(i <= length(desc)) {
- if(tags[i] == "TEXT") {
- if(tags[i] == "\n") {
- if(inPara) {
- op <- paste0(op, "\n")
- inPara <- FALSE
- }
- op <- paste0(op, "\n")
- inPara <- TRUE
- } else {
- op <- paste0(op, desc[[i]])
- }
- } else if(tags[i] %in% names(html)) {
- otag <- paste0("<", html[[tags[i]]], ">")
- ctag <- paste0("", html[[tags[i]]], ">")
- op <- paste0(op, otag, desc[[i]], ctag)
- }
- i = i + 1
- }
-
- return(op)
-
- }
-
- writeArgs <- function(args) {
-
- args <- args[tools:::RdTags(args) == "\\item"]
- template <- readLines("C:/R/shinyBS/inst/docgen/parameter.txt")
- op <- c()
-
- i <- 1
- while(i <= length(args)) {
-
- arg <- args[[i]]
- item <- unlist(arg[[1]])
-
- if(is.null(item)) item = "..."
- def <- writeDesc(arg[[2]])
-
- arg <- gsub("<%=param %>", item, template, fixed = TRUE)
- arg <- gsub("<%=def %>", def, arg, fixed = TRUE)
-
- op <- c(op, arg)
-
- i = i + 1
-
- }
-
- return(paste0(op, collapse = "\n"))
-
- }
-
- name_Rd <- function(Rd) {
- tags <- tools:::RdTags(Rd)
- for(i in seq(length(tags))) {
- if(tags[i] != "\\section") {
- n <- gsub("\\", "", tags[i], fixed = TRUE)
- } else {
- n <- unlist(Rd[[i]][[1L]])
- Rd[[i]] <- Rd[[i]][[2L]]
- }
- names(Rd)[i] <- n
- }
- return(Rd)
- }
-
- writeName <- function(Rd) {
- unlist(Rd$name)
- }
-
- writeExample <- function(ex) {
- ex <- ex[[2]]
- ex <- paste0(ex, collapse = "")
- return(ex)
- }
-
- component_template <- readLines("C:/R/shinyBS/inst/docgen/component.txt")
-
- for(fn in functions) {
-
- componentNav <- c(componentNav, paste0("
", fn, " "))
-
- infile <- file.path(path, "man", paste0(fn, ".Rd"))
- Rd <- name_Rd(tools:::prepare_Rd(parse_Rd(infile, verbose = FALSE)))
-
- comp <- gsub("<%=name %>", writeName(Rd), component_template, fixed = TRUE)
- comp <- gsub("<%=description %>", writeDesc(Rd$description), comp, fixed = TRUE)
- comp <- gsub("<%=usage %>", paste0(unlist(Rd$usage[-1]), collapse = ""), comp, fixed = TRUE)
- comp <- gsub("<%=params %>", writeArgs(Rd$arguments), comp, fixed = TRUE)
-
- components <- c(components, comp)
-
- }
-
- componentNav <- paste0(componentNav, collapse = "\n")
- components <- paste0(components, collapse = "\n")
-
- infile <- file.path(path, "man", paste0(family, ".Rd"))
- Rd <- name_Rd(tools:::prepare_Rd(parse_Rd(infile, verbose = FALSE)))
-
- template <- readLines("C:/R/shinyBS/inst/docgen/document.txt")
-
- ex <- writeExample(Rd$examples)
-
- template <- gsub("<%=family %>", writeName(Rd), template, fixed = TRUE)
- template <- gsub("<%=componentnav %>", componentNav, template, fixed = TRUE)
- template <- gsub("<%=familydescription %>", writeDesc(Rd$description), template, fixed = TRUE)
- template <- gsub("<%=familydetails %>", writeDesc(Rd$details), template, fixed = TRUE)
- template <- gsub("<%=components %>", components, template, fixed = TRUE)
- template <- gsub("<%=changes %>", writeDesc(Rd$Changes), template, fixed = TRUE)
- template <- gsub("<%=example %>", writeExample(Rd$examples), template, fixed = TRUE)
-
- writeLines(template, con)
-
-}
-
-createDocPage("test.html", family, functions, path)
-
\ No newline at end of file
diff --git a/inst/docgen/document.txt b/inst/docgen/document.txt
deleted file mode 100644
index 4956f76..0000000
--- a/inst/docgen/document.txt
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
- shinyBS: <%=family %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Alerts
-
- Description
- <%=familydescription %>
-
-
- Details
- <%=familydetails %>
-
-
- Components
- <%=components %>
-
-
- Changes
- <%=changes %>
-
-
-
-
- Example
-
-
-
-
-
-
-
-<%=example %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/inst/docgen/parameter.txt b/inst/docgen/parameter.txt
deleted file mode 100644
index 19b3b15..0000000
--- a/inst/docgen/parameter.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-<%=param %>
-<%=def %>
From 66a89dcd6f0cd2c3d56dee2310e0acb6a9ee0fad Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 11 Mar 2015 15:22:16 -0400
Subject: [PATCH 69/89] Updated Examples to work with docgen
---
R/Alerts.R | 54 ++++++++--------
R/Buttons.R | 120 ++++++++++++++++++-----------------
R/Collapses.R | 6 +-
R/Modals.R | 6 +-
R/Tooltips_and_Popovers.R | 6 +-
man/Alerts.Rd | 50 ++++++++-------
man/Buttons.Rd | 114 +++++++++++++++++----------------
man/Collapses.Rd | 8 ++-
man/Modals.Rd | 6 +-
man/Tooltips_and_Popovers.Rd | 8 ++-
10 files changed, 199 insertions(+), 179 deletions(-)
diff --git a/R/Alerts.R b/R/Alerts.R
index 4bbc9e8..0d8a5ed 100644
--- a/R/Alerts.R
+++ b/R/Alerts.R
@@ -41,34 +41,36 @@
#'library(shiny)
#'library(shinyBS)
#'shinyApp(
-#' ui = fluidPage(
-#' sidebarLayout(
-#' sidebarPanel(textInput("num1", NULL, value = 100),
-#' "divided by", textInput("num2", NULL, value = 20),
-#' "equals", textOutput("exampleOutput")),
-#' mainPanel(
-#' bsAlert("alert")
+#' ui =
+#' fluidPage(
+#' sidebarLayout(
+#' sidebarPanel(textInput("num1", NULL, value = 100),
+#' "divided by", textInput("num2", NULL, value = 20),
+#' "equals", textOutput("exampleOutput")),
+#' mainPanel(
+#' bsAlert("alert")
+#' )
#' )
-#' )
#' ),
-#' server = function(input, output, session) {
-#' output$exampleOutput <- renderText({
-#' num1 <- as.numeric(input$num1)
-#' num2 <- as.numeric(input$num2)
-#'
-#' if(is.na(num1) | is.na(num2)) {
-#' createAlert(session, "alert", "exampleAlert", title = "Oops",
-#' content = "Both inputs should be numeric.", append = FALSE)
-#' } else if(num2 == 0) {
-#' createAlert(session, "alert", "exampleAlert", title = "Oops",
-#' content = "You cannot divide by 0.", append = FALSE)
-#' } else {
-#' closeAlert(session, "exampleAlert")
-#' return(num1/num2)
-#' }
-#'
-#' })
-#' }
+#' server =
+#' function(input, output, session) {
+#' output$exampleOutput <- renderText({
+#' num1 <- as.numeric(input$num1)
+#' num2 <- as.numeric(input$num2)
+#'
+#' if(is.na(num1) | is.na(num2)) {
+#' createAlert(session, "alert", "exampleAlert", title = "Oops",
+#' content = "Both inputs should be numeric.", append = FALSE)
+#' } else if(num2 == 0) {
+#' createAlert(session, "alert", "exampleAlert", title = "Oops",
+#' content = "You cannot divide by 0.", append = FALSE)
+#' } else {
+#' closeAlert(session, "exampleAlert")
+#' return(num1/num2)
+#' }
+#'
+#' })
+#' }
#')
#'}
#'@templateVar item_name Alerts
diff --git a/R/Buttons.R b/R/Buttons.R
index 8667ab3..3ea341d 100644
--- a/R/Buttons.R
+++ b/R/Buttons.R
@@ -39,70 +39,72 @@
#'library(shiny)
#'library(shinyBS)
#'shinyApp(
-#' ui = fluidPage(
-#' sidebarLayout(
-#' sidebarPanel(
-#' sliderInput("bins",
-#' "Move the slider to see its effect on the button below:",
-#' min = 1,
-#' max = 50,
-#' value = 1),
-#' bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
-#' tags$p("Clicking the first button below changes the disabled state of the second button."),
-#' bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
-#' bsButton("actOne", label = "Block Action Button", block = TRUE)
+#' ui =
+#' fluidPage(
+#' sidebarLayout(
+#' sidebarPanel(
+#' sliderInput("bins",
+#' "Move the slider to see its effect on the button below:",
+#' min = 1,
+#' max = 50,
+#' value = 1),
+#' bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
+#' tags$p("Clicking the first button below changes the disabled state of the second button."),
+#' bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
+#' bsButton("actOne", label = "Block Action Button", block = TRUE)
#'
-#' ),
-#' mainPanel(
-#' textOutput("exampleText")
-#' )
-#' )
-#' ),
-#' server = function(input, output, session) {
-#' observeEvent(input$togOne, ({
-#' updateButton(session, "actOne", disabled = !input$togOne)
-#' }))
-#' observeEvent(input$bins, ({
-#'
-#' b <- input$bins
-#' disabled = NULL
-#' style = "default"
-#' icon = ""
-#'
-#' if(b < 5) {
-#' disabled = TRUE
-#' icon <- icon("ban")
-#' } else {
-#' disabled = FALSE
-#' }
-#'
-#' if(b < 15 | b > 35) {
-#' style = "danger"
-#' } else if(b < 20 | b > 30) {
-#' style = "warning"
-#' } else {
+#' ),
+#' mainPanel(
+#' textOutput("exampleText")
+#' )
+#' )
+#' ),
+#' server =
+#' function(input, output, session) {
+#' observeEvent(input$togOne, ({
+#' updateButton(session, "actOne", disabled = !input$togOne)
+#' }))
+#' observeEvent(input$bins, ({
+#'
+#' b <- input$bins
+#' disabled = NULL
#' style = "default"
-#' icon = icon("check")
-#' }
+#' icon = ""
+#'
+#' if(b < 5) {
+#' disabled = TRUE
+#' icon <- icon("ban")
+#' } else {
+#' disabled = FALSE
+#' }
+#'
+#' if(b < 15 | b > 35) {
+#' style = "danger"
+#' } else if(b < 20 | b > 30) {
+#' style = "warning"
+#' } else {
+#' style = "default"
+#' icon = icon("check")
+#' }
#'
-#' updateButton(session, "actTwo", disabled = disabled, style = style, icon = icon)
+#' updateButton(session, "actTwo", disabled = disabled, style = style, icon = icon)
#'
-#' }))
+#' }))
#'
-#' output$exampleText <- renderText({
-#' input$actTwo
-#' b <- isolate(input$bins)
-#' txt = ""
-#' if((b > 5 & b < 15) | b > 35) {
-#' txt = "That was dangerous."
-#' } else if((b > 5 & b < 20) | b > 30) {
-#' txt = "I warned you about that."
-#' } else if(b >= 20 & b <= 30) {
-#' txt = "You have choosen... wisely."
-#' }
-#' return(txt)
-#' })
-#' }
+#' output$exampleText <- renderText({
+#' input$actTwo
+#' b <- isolate(input$bins)
+#' txt = ""
+#' if((b > 5 & b < 15) | b > 35) {
+#' txt = "That was dangerous."
+#' } else if((b > 5 & b < 20) | b > 30) {
+#' txt = "I warned you about that."
+#' } else if(b >= 20 & b <= 30) {
+#' txt = "You have choosen... wisely."
+#' }
+#' return(txt)
+#' })
+#' }
#')
#'}
#'@templateVar item_name Buttons
diff --git a/R/Collapses.R b/R/Collapses.R
index b214e40..85c9907 100644
--- a/R/Collapses.R
+++ b/R/Collapses.R
@@ -33,7 +33,8 @@
#'library(shinyBS)
#'
#'shinyApp(
-#' ui = fluidPage(
+#' ui =
+#' fluidPage(
#' sidebarLayout(
#' sidebarPanel(HTML("This button will open Panel 1 using updateCollapse."),
#' actionButton("p1Button", "Push Me!"),
@@ -51,7 +52,8 @@
#' )
#' )
#' ),
-#' server = function(input, output, session) {
+#' server =
+#' function(input, output, session) {
#' output$genericPlot <- renderPlot(plot(rnorm(100)))
#' observeEvent(input$p1Button, ({
#' updateCollapse(session, "collapseExample", open = "Panel 1")
diff --git a/R/Modals.R b/R/Modals.R
index 4f77aa4..ee7c81b 100644
--- a/R/Modals.R
+++ b/R/Modals.R
@@ -35,7 +35,8 @@
#'library(shinyBS)
#'
#'shinyApp(
-#' ui = fluidPage(
+#' ui =
+#' fluidPage(
#' sidebarLayout(
#' sidebarPanel(
#' sliderInput("bins",
@@ -53,7 +54,8 @@
#' )
#' )
#' ),
-#' server = function(input, output, session) {
+#' server =
+#' function(input, output, session) {
#'
#' output$distPlot <- renderPlot({
#'
diff --git a/R/Tooltips_and_Popovers.R b/R/Tooltips_and_Popovers.R
index 1dfe566..f282faa 100644
--- a/R/Tooltips_and_Popovers.R
+++ b/R/Tooltips_and_Popovers.R
@@ -51,7 +51,8 @@
#'library(shiny)
#'library(shinyBS)
#'shinyApp(
-#' ui = fluidPage(
+#' ui =
+#' fluidPage(
#' sidebarLayout(
#' sidebarPanel(
#' sliderInput("bins",
@@ -67,7 +68,8 @@
#' )
#' )
#' ),
-#' server = function(input, output, session) {
+#' server =
+#' function(input, output, session) {
#' output$distPlot <- renderPlot({
#'
#' # generate bins based on input$bins from ui.R
diff --git a/man/Alerts.Rd b/man/Alerts.Rd
index 04da51b..fa792fd 100644
--- a/man/Alerts.Rd
+++ b/man/Alerts.Rd
@@ -52,34 +52,36 @@ There are three functions in the Alerts family:
library(shiny)
library(shinyBS)
shinyApp(
- ui = fluidPage(
- sidebarLayout(
- sidebarPanel(textInput("num1", NULL, value = 100),
- "divided by", textInput("num2", NULL, value = 20),
- "equals", textOutput("exampleOutput")),
- mainPanel(
- bsAlert("alert")
+ ui =
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(textInput("num1", NULL, value = 100),
+ "divided by", textInput("num2", NULL, value = 20),
+ "equals", textOutput("exampleOutput")),
+ mainPanel(
+ bsAlert("alert")
+ )
)
- )
),
- server = function(input, output, session) {
- output$exampleOutput <- renderText({
- num1 <- as.numeric(input$num1)
- num2 <- as.numeric(input$num2)
+ server =
+ function(input, output, session) {
+ output$exampleOutput <- renderText({
+ num1 <- as.numeric(input$num1)
+ num2 <- as.numeric(input$num2)
- if(is.na(num1) | is.na(num2)) {
- createAlert(session, "alert", "exampleAlert", title = "Oops",
- content = "Both inputs should be numeric.", append = FALSE)
- } else if(num2 == 0) {
- createAlert(session, "alert", "exampleAlert", title = "Oops",
- content = "You cannot divide by 0.", append = FALSE)
- } else {
- closeAlert(session, "exampleAlert")
- return(num1/num2)
- }
+ if(is.na(num1) | is.na(num2)) {
+ createAlert(session, "alert", "exampleAlert", title = "Oops",
+ content = "Both inputs should be numeric.", append = FALSE)
+ } else if(num2 == 0) {
+ createAlert(session, "alert", "exampleAlert", title = "Oops",
+ content = "You cannot divide by 0.", append = FALSE)
+ } else {
+ closeAlert(session, "exampleAlert")
+ return(num1/num2)
+ }
- })
- }
+ })
+ }
)
}
}
diff --git a/man/Buttons.Rd b/man/Buttons.Rd
index a2e35a3..41b8aab 100644
--- a/man/Buttons.Rd
+++ b/man/Buttons.Rd
@@ -50,70 +50,72 @@ There are two functions in the Buttons family:
library(shiny)
library(shinyBS)
shinyApp(
- ui = fluidPage(
- sidebarLayout(
- sidebarPanel(
- sliderInput("bins",
- "Move the slider to see its effect on the button below:",
- min = 1,
- max = 50,
- value = 1),
- bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
- tags$p("Clicking the first button below changes the disabled state of the second button."),
- bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
- bsButton("actOne", label = "Block Action Button", block = TRUE)
+ ui =
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(
+ sliderInput("bins",
+ "Move the slider to see its effect on the button below:",
+ min = 1,
+ max = 50,
+ value = 1),
+ bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
+ tags$p("Clicking the first button below changes the disabled state of the second button."),
+ bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
+ bsButton("actOne", label = "Block Action Button", block = TRUE)
- ),
- mainPanel(
- textOutput("exampleText")
+ ),
+ mainPanel(
+ textOutput("exampleText")
+ )
)
- )
- ),
- server = function(input, output, session) {
- observeEvent(input$togOne, ({
- updateButton(session, "actOne", disabled = !input$togOne)
- }))
- observeEvent(input$bins, ({
+ ),
+ server =
+ function(input, output, session) {
+ observeEvent(input$togOne, ({
+ updateButton(session, "actOne", disabled = !input$togOne)
+ }))
+ observeEvent(input$bins, ({
- b <- input$bins
- disabled = NULL
- style = "default"
- icon = ""
+ b <- input$bins
+ disabled = NULL
+ style = "default"
+ icon = ""
- if(b < 5) {
- disabled = TRUE
- icon <- icon("ban")
- } else {
- disabled = FALSE
- }
+ if(b < 5) {
+ disabled = TRUE
+ icon <- icon("ban")
+ } else {
+ disabled = FALSE
+ }
- if(b < 15 | b > 35) {
- style = "danger"
- } else if(b < 20 | b > 30) {
- style = "warning"
- } else {
- style = "default"
- icon = icon("check")
- }
+ if(b < 15 | b > 35) {
+ style = "danger"
+ } else if(b < 20 | b > 30) {
+ style = "warning"
+ } else {
+ style = "default"
+ icon = icon("check")
+ }
- updateButton(session, "actTwo", disabled = disabled, style = style, icon = icon)
+ updateButton(session, "actTwo", disabled = disabled, style = style, icon = icon)
- }))
+ }))
- output$exampleText <- renderText({
- input$actTwo
- b <- isolate(input$bins)
- txt = ""
- if((b > 5 & b < 15) | b > 35) {
- txt = "That was dangerous."
- } else if((b > 5 & b < 20) | b > 30) {
- txt = "I warned you about that."
- } else if(b >= 20 & b <= 30) {
- txt = "You have choosen... wisely."
- }
- return(txt)
- })
- }
+ output$exampleText <- renderText({
+ input$actTwo
+ b <- isolate(input$bins)
+ txt = ""
+ if((b > 5 & b < 15) | b > 35) {
+ txt = "That was dangerous."
+ } else if((b > 5 & b < 20) | b > 30) {
+ txt = "I warned you about that."
+ } else if(b >= 20 & b <= 30) {
+ txt = "You have choosen... wisely."
+ }
+ return(txt)
+ })
+ }
)
}
}
diff --git a/man/Collapses.Rd b/man/Collapses.Rd
index f1c3ab5..e26242d 100644
--- a/man/Collapses.Rd
+++ b/man/Collapses.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
-% Please edit documentation in R/Collapse.R
+% Please edit documentation in R/Collapses.R
\name{Collapses}
\alias{Collapses}
\title{Collapses}
@@ -44,7 +44,8 @@ library(shiny)
library(shinyBS)
shinyApp(
- ui = fluidPage(
+ ui =
+ fluidPage(
sidebarLayout(
sidebarPanel(HTML("This button will open Panel 1 using updateCollapse."),
actionButton("p1Button", "Push Me!"),
@@ -62,7 +63,8 @@ shinyApp(
)
)
),
- server = function(input, output, session) {
+ server =
+ function(input, output, session) {
output$genericPlot <- renderPlot(plot(rnorm(100)))
observeEvent(input$p1Button, ({
updateCollapse(session, "collapseExample", open = "Panel 1")
diff --git a/man/Modals.Rd b/man/Modals.Rd
index 72b3bf3..a66d5b3 100644
--- a/man/Modals.Rd
+++ b/man/Modals.Rd
@@ -46,7 +46,8 @@ library(shiny)
library(shinyBS)
shinyApp(
- ui = fluidPage(
+ ui =
+ fluidPage(
sidebarLayout(
sidebarPanel(
sliderInput("bins",
@@ -64,7 +65,8 @@ shinyApp(
)
)
),
- server = function(input, output, session) {
+ server =
+ function(input, output, session) {
output$distPlot <- renderPlot({
diff --git a/man/Tooltips_and_Popovers.Rd b/man/Tooltips_and_Popovers.Rd
index b91e5a9..ab610c2 100644
--- a/man/Tooltips_and_Popovers.Rd
+++ b/man/Tooltips_and_Popovers.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
-% Please edit documentation in R/Tooltips.R
+% Please edit documentation in R/Tooltips_and_Popovers.R
\name{Tooltips_and_Popovers}
\alias{Tooltips_and_Popovers}
\title{Tooltips and Popovers}
@@ -61,7 +61,8 @@ details.
library(shiny)
library(shinyBS)
shinyApp(
- ui = fluidPage(
+ ui =
+ fluidPage(
sidebarLayout(
sidebarPanel(
sliderInput("bins",
@@ -77,7 +78,8 @@ shinyApp(
)
)
),
- server = function(input, output, session) {
+ server =
+ function(input, output, session) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
From c316cf553d4ca750b8d1c643a2c3e50bb714d14e Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 11 Mar 2015 15:40:24 -0400
Subject: [PATCH 70/89] fixed error in Collapses example
---
R/Collapses.R | 2 +-
man/Collapses.Rd | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/R/Collapses.R b/R/Collapses.R
index 85c9907..4df1c15 100644
--- a/R/Collapses.R
+++ b/R/Collapses.R
@@ -46,7 +46,7 @@
#' bsCollapsePanel("Panel 1", "This is a panel with just text ",
#' "and has the default style. You can change the style in ",
#' "the sidebar.", style = "info"),
-#' bsCollapsePanel("Panel 2", "This panel has a generic plot. "
+#' bsCollapsePanel("Panel 2", "This panel has a generic plot. ",
#' "and a 'success' style.", plotOutput("genericPlot"), style = "success")
#' )
#' )
diff --git a/man/Collapses.Rd b/man/Collapses.Rd
index e26242d..73ee353 100644
--- a/man/Collapses.Rd
+++ b/man/Collapses.Rd
@@ -57,7 +57,7 @@ shinyApp(
bsCollapsePanel("Panel 1", "This is a panel with just text ",
"and has the default style. You can change the style in ",
"the sidebar.", style = "info"),
- bsCollapsePanel("Panel 2", "This panel has a generic plot. "
+ bsCollapsePanel("Panel 2", "This panel has a generic plot. ",
"and a 'success' style.", plotOutput("genericPlot"), style = "success")
)
)
From 2fe3f2f75abce0f19960c014736a32198e77baf2 Mon Sep 17 00:00:00 2001
From: Eric
Date: Thu, 12 Mar 2015 09:08:59 -0400
Subject: [PATCH 71/89] removed debugging code
---
R/bsCollapse.R | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/R/bsCollapse.R b/R/bsCollapse.R
index 2339e94..cb34f0b 100644
--- a/R/bsCollapse.R
+++ b/R/bsCollapse.R
@@ -25,7 +25,7 @@ bsCollapse <- function(..., id = NULL, multiple = FALSE, open = NULL) {
}
panels <- list(...)
- panels <<- panels
+
for(i in seq(length(panels))) {
if(getAttribs(panels[[i]])$value %in% open) {
panels[[i]]$children[[2]] <- addClass(panels[[i]]$children[[2]], "in")
From c65fd2f1c270386f20098893b9f5a8ab762c2422 Mon Sep 17 00:00:00 2001
From: Eric
Date: Thu, 12 Mar 2015 14:06:42 -0400
Subject: [PATCH 72/89] added check for existing alert before creating new
alert
---
inst/www/shinyBS.js | 68 ++++++++++++++++++++++++++-------------------
1 file changed, 40 insertions(+), 28 deletions(-)
diff --git a/inst/www/shinyBS.js b/inst/www/shinyBS.js
index bd15ded..ea21ca4 100644
--- a/inst/www/shinyBS.js
+++ b/inst/www/shinyBS.js
@@ -137,40 +137,52 @@ Shiny.inputBindings.register(shinyBS.inputBindings.collapse);
Shiny.addCustomMessageHandler("bsAlertCreate", function(data) {
- var $alert = $("");
+ var create = true;
- if(data.hasOwnProperty('style')) {
- $alert.addClass("alert-" + data.style);
- } else {
- $alert.addClass("alert-info");
- }
-
- if(data.hasOwnProperty("dismiss")) {
- $alert.addClass("alert-dismissable");
- }
-
if(data.hasOwnProperty("alertId")) {
- $alert.attr("id", data.alertId);
- }
-
- if(data.hasOwnProperty('dismiss')) {
- if(data.dismiss == true) {
- $alert.append("")
+ if($("#" + data.alertId).length > 0) {
+ create = false;
}
}
- if(data.hasOwnProperty('title')) {
- $alert.append("" + data.title + "
");
- }
-
- if(data.hasOwnProperty("content")) {
- $alert.append(data.content);
- }
+ if(create) {
- if(data.append == true) {
- $alert.appendTo("#" + data.id);
- } else {
- $("#" + data.id).html($alert);
+ var $alert = $("");
+
+ if(data.hasOwnProperty('style')) {
+ $alert.addClass("alert-" + data.style);
+ } else {
+ $alert.addClass("alert-info");
+ }
+
+ if(data.hasOwnProperty("dismiss")) {
+ $alert.addClass("alert-dismissable");
+ }
+
+ if(data.hasOwnProperty("alertId")) {
+ $alert.attr("id", data.alertId);
+ }
+
+ if(data.hasOwnProperty('dismiss')) {
+ if(data.dismiss == true) {
+ $alert.append("")
+ }
+ }
+
+ if(data.hasOwnProperty('title')) {
+ $alert.append("" + data.title + "
");
+ }
+
+ if(data.hasOwnProperty("content")) {
+ $alert.append(data.content);
+ }
+
+ if(data.append == true) {
+ $alert.appendTo("#" + data.id);
+ } else {
+ $("#" + data.id).html($alert);
+ }
+
}
});
From 1319b22e1eb3e23e8f3f6111c80177eb27a21a53 Mon Sep 17 00:00:00 2001
From: Eric
Date: Fri, 13 Mar 2015 10:21:43 -0400
Subject: [PATCH 73/89] more debugging, buttons and removeTooltip/removePopover
---
R/Buttons.R | 3 ++-
R/bsButton.R | 2 +-
R/removePopover.R | 2 +-
R/removeTooltip.R | 2 +-
inst/www/shinyBS.js | 4 ++--
man/Buttons.Rd | 3 ++-
6 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/R/Buttons.R b/R/Buttons.R
index 3ea341d..ba17425 100644
--- a/R/Buttons.R
+++ b/R/Buttons.R
@@ -50,7 +50,8 @@
#' value = 1),
#' bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
#' tags$p("Clicking the first button below changes the disabled state of the second button."),
-#' bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
+#' bsButton("togOne", label = "Toggle 'Block Action Button' disabled status",
+#' block = TRUE, type = "toggle", value = TRUE),
#' bsButton("actOne", label = "Block Action Button", block = TRUE)
#'
#' ),
diff --git a/R/bsButton.R b/R/bsButton.R
index f42ebc3..576eea6 100644
--- a/R/bsButton.R
+++ b/R/bsButton.R
@@ -21,7 +21,7 @@
bsButton <- function(inputId, label, icon = NULL, ..., style = "default",
size = "default", type = "action", block = FALSE,
disabled = FALSE, value = FALSE) {
- btn <- actionButton(inputId, label, icon, ...)
+ btn <- shiny::actionButton(inputId, label, icon, ...)
if(type == "toggle") {
btn <- removeClass(btn, "action-button")
btn <- addClass(btn, "sbs-toggle-button")
diff --git a/R/removePopover.R b/R/removePopover.R
index c0a619c..024d1de 100644
--- a/R/removePopover.R
+++ b/R/removePopover.R
@@ -13,6 +13,6 @@
#'@export
removePopover <- function(session, id) {
- session$sendCustomMessage(type="updateTooltip", list(action = "remove", type = "popover", id = id))
+ session$sendCustomMessage(type="updateTooltipOrPopover", list(action = "remove", type = "popover", id = id))
}
\ No newline at end of file
diff --git a/R/removeTooltip.R b/R/removeTooltip.R
index 2dac958..51ae00e 100644
--- a/R/removeTooltip.R
+++ b/R/removeTooltip.R
@@ -13,6 +13,6 @@
#'@export
removeTooltip <- function(session, id) {
- session$sendCustomMessage(type="updateTooltip", list(action = "remove", type = "tooltip", id = id))
+ session$sendCustomMessage(type="updateTooltipOrPopover", list(action = "remove", type = "tooltip", id = id))
}
\ No newline at end of file
diff --git a/inst/www/shinyBS.js b/inst/www/shinyBS.js
index ea21ca4..4833fa2 100644
--- a/inst/www/shinyBS.js
+++ b/inst/www/shinyBS.js
@@ -213,9 +213,9 @@ shinyBS.addTooltip = function(id, type, opts) {
shinyBS.removeTooltip = function(id, type) {
var $id = shinyBS.getTooltipTarget(id);
if(type == "tooltip") {
- $(id).tooltip("destroy");
+ $id.tooltip("destroy");
} else if(type == "popover") {
- $(id).popover("destroy");
+ $id.popover("destroy");
}
}
diff --git a/man/Buttons.Rd b/man/Buttons.Rd
index 41b8aab..4634027 100644
--- a/man/Buttons.Rd
+++ b/man/Buttons.Rd
@@ -61,7 +61,8 @@ shinyApp(
value = 1),
bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
tags$p("Clicking the first button below changes the disabled state of the second button."),
- bsButton("togOne", label = "Toggle 'Block Action Button' disabled status", block = TRUE, type = "toggle", value = TRUE),
+ bsButton("togOne", label = "Toggle 'Block Action Button' disabled status",
+ block = TRUE, type = "toggle", value = TRUE),
bsButton("actOne", label = "Block Action Button", block = TRUE)
),
From 41fbf52725404e9c8570a04a7252ccdcb53359fb Mon Sep 17 00:00:00 2001
From: Eric
Date: Thu, 19 Mar 2015 12:29:46 -0400
Subject: [PATCH 74/89] Fixed HTML issue with popover content, issue #22.
Extended wait time for bsTooltip and bsPopover, issue #21.
---
.Rbuildignore | 1 +
DESCRIPTION | 6 +++---
R/Tooltips_and_Popovers.R | 7 ++++---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/.Rbuildignore b/.Rbuildignore
index 91114bf..68c4c23 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
+man-roxygen
diff --git a/DESCRIPTION b/DESCRIPTION
index 94fdf72..1e06b8b 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,10 +2,10 @@ Package: shinyBS
Type: Package
Title: Twitter Bootstrap Components for Shiny
Version: 0.50
-Date: 2015-01-27
+Date: 2015-03-19
Author: Eric Bailey
-Maintainer: Eric Bailey
-Description: Adds more Twitter Bootstrap components to the shiny interface
+Maintainer: Eric Bailey
+Description: Adds additional Twitter Bootstrap components to Shiny.
Imports:
shiny (>= 0.11),
htmltools
diff --git a/R/Tooltips_and_Popovers.R b/R/Tooltips_and_Popovers.R
index f282faa..7462d07 100644
--- a/R/Tooltips_and_Popovers.R
+++ b/R/Tooltips_and_Popovers.R
@@ -106,8 +106,9 @@ createTooltipOrPopoverOnServer <- function(session, id, type, options) {
createTooltipOrPopoverOnUI <- function(id, type, options) {
options = paste0("{'", paste(names(options), options, sep = "': '", collapse = "', '"), "'}")
-
- bsTag <- shiny::tags$script(paste0("$(document).ready(function() {setTimeout(function() {shinyBS.addTooltip('", id, "', '", type, "', ", options, ")}, 100)});"))
+ print(paste0("createTooltipOrPopoverOnUI", options))
+ bsTag <- shiny::tags$script(HTML(paste0("$(document).ready(function() {setTimeout(function() {shinyBS.addTooltip('", id, "', '", type, "', ", options, ")}, 500)});")))
+ print(bsTag)
htmltools::attachDependencies(bsTag, shinyBSDep)
}
@@ -120,7 +121,7 @@ buildTooltipOrPopoverOptionsList <- function(title, placement, trigger, options,
if(!missing(content)) {
if(is.null(options$content)) {
- options$content = content
+ options$content = HTML(content)
}
}
From 8d00049fd515df0f93979ad5e1f87b86cf947033 Mon Sep 17 00:00:00 2001
From: Eric
Date: Thu, 19 Mar 2015 15:58:49 -0400
Subject: [PATCH 75/89] Added tipify as possible solution to issue #21.
---
NAMESPACE | 1 +
R/Tooltips_and_Popovers.R | 4 ++--
R/tipify.R | 17 +++++++++++++++++
3 files changed, 20 insertions(+), 2 deletions(-)
create mode 100644 R/tipify.R
diff --git a/NAMESPACE b/NAMESPACE
index be22d7c..65b103a 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -13,6 +13,7 @@ export(closeAlert)
export(createAlert)
export(removePopover)
export(removeTooltip)
+export(tipify)
export(toggleModal)
export(updateButton)
export(updateCollapse)
diff --git a/R/Tooltips_and_Popovers.R b/R/Tooltips_and_Popovers.R
index 7462d07..5825d3b 100644
--- a/R/Tooltips_and_Popovers.R
+++ b/R/Tooltips_and_Popovers.R
@@ -106,9 +106,9 @@ createTooltipOrPopoverOnServer <- function(session, id, type, options) {
createTooltipOrPopoverOnUI <- function(id, type, options) {
options = paste0("{'", paste(names(options), options, sep = "': '", collapse = "', '"), "'}")
- print(paste0("createTooltipOrPopoverOnUI", options))
+
bsTag <- shiny::tags$script(HTML(paste0("$(document).ready(function() {setTimeout(function() {shinyBS.addTooltip('", id, "', '", type, "', ", options, ")}, 500)});")))
- print(bsTag)
+
htmltools::attachDependencies(bsTag, shinyBSDep)
}
diff --git a/R/tipify.R b/R/tipify.R
new file mode 100644
index 0000000..2d4807a
--- /dev/null
+++ b/R/tipify.R
@@ -0,0 +1,17 @@
+#'@export
+tipify <- function(el, title, placement="bottom", trigger="hover", options = NULL) {
+
+ id <- el$attribs$id
+
+ if(is.null(id)) {
+ id <- paste0("tipify", as.integer(runif(1, 1, 10000000)))
+ el <- addAttribs(el, id = id)
+ }
+
+ options = buildTooltipOrPopoverOptionsList(title, placement, trigger, options)
+
+ script <- createTooltipOrPopoverOnUI(id, "tooltip", options)
+
+ return(tagList(el, script))
+
+}
\ No newline at end of file
From 683f4cb860596ca72b615358ed86d75817842fff Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 25 Mar 2015 12:11:05 -0400
Subject: [PATCH 76/89] More cleanup for re-submission to CRAN
---
.Rbuildignore | 2 +
DESCRIPTION | 8 ++--
NAMESPACE | 2 +
R/Alerts.R | 2 +-
R/Buttons.R | 6 +--
R/Collapses.R | 2 +-
R/Modals.R | 2 +-
R/Tooltips_and_Popovers.R | 31 +++++++++++---
R/addPopover.R | 4 +-
R/addTooltip.R | 2 +-
R/bsExample.R | 41 ++++++++++++++++++
R/bsPopover.R | 2 +-
R/bsTooltip.R | 2 +-
R/closeAlert.R | 1 +
R/createAlert.R | 2 +-
R/popify.R | 36 ++++++++++++++++
R/shinyBS.R | 0
R/tipify.R | 20 ++++++++-
inst/examples/Alerts/server.R | 22 ++++++++++
inst/examples/Alerts/ui.R | 13 ++++++
inst/examples/Buttons/server.R | 49 ++++++++++++++++++++++
inst/examples/Buttons/ui.R | 23 ++++++++++
inst/examples/Collapses/server.R | 13 ++++++
inst/examples/Collapses/ui.R | 21 ++++++++++
inst/examples/Modals/server.R | 33 +++++++++++++++
inst/examples/Modals/ui.R | 21 ++++++++++
inst/examples/TooltipsandPopovers/server.R | 30 +++++++++++++
inst/examples/TooltipsandPopovers/ui.R | 20 +++++++++
inst/tests/tipify_test.R | 35 ++++++++++++++++
inst/tests/tipify_test2.R | 46 ++++++++++++++++++++
man-roxygen/footer.R | 4 +-
man/Alerts.Rd | 6 +--
man/Buttons.Rd | 10 ++---
man/Collapses.Rd | 6 +--
man/Modals.Rd | 6 +--
man/Tooltips_and_Popovers.Rd | 36 ++++++++++++----
man/addPopover.Rd | 13 +++---
man/addTooltip.Rd | 11 ++---
man/bsAlert.Rd | 4 +-
man/bsButton.Rd | 4 +-
man/bsCollapse.Rd | 4 +-
man/bsCollapsePanel.Rd | 4 +-
man/bsExample.Rd | 32 ++++++++++++++
man/bsModal.Rd | 4 +-
man/bsPopover.Rd | 11 ++---
man/bsTooltip.Rd | 11 ++---
man/closeAlert.Rd | 6 +--
man/createAlert.Rd | 6 +--
man/popify.Rd | 47 +++++++++++++++++++++
man/removePopover.Rd | 7 ++--
man/removeTooltip.Rd | 7 ++--
man/tipify.Rd | 44 +++++++++++++++++++
man/toggleModal.Rd | 4 +-
man/updateButton.Rd | 4 +-
man/updateCollapse.Rd | 4 +-
55 files changed, 690 insertions(+), 96 deletions(-)
create mode 100644 R/bsExample.R
create mode 100644 R/popify.R
delete mode 100644 R/shinyBS.R
create mode 100644 inst/examples/Alerts/server.R
create mode 100644 inst/examples/Alerts/ui.R
create mode 100644 inst/examples/Buttons/server.R
create mode 100644 inst/examples/Buttons/ui.R
create mode 100644 inst/examples/Collapses/server.R
create mode 100644 inst/examples/Collapses/ui.R
create mode 100644 inst/examples/Modals/server.R
create mode 100644 inst/examples/Modals/ui.R
create mode 100644 inst/examples/TooltipsandPopovers/server.R
create mode 100644 inst/examples/TooltipsandPopovers/ui.R
create mode 100644 inst/tests/tipify_test.R
create mode 100644 inst/tests/tipify_test2.R
create mode 100644 man/bsExample.Rd
create mode 100644 man/popify.Rd
create mode 100644 man/tipify.Rd
diff --git a/.Rbuildignore b/.Rbuildignore
index 68c4c23..cb1ce54 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -1,3 +1,5 @@
^.*\.Rproj$
^\.Rproj\.user$
man-roxygen
+inst\tests
+README.md
diff --git a/DESCRIPTION b/DESCRIPTION
index 1e06b8b..39fdefa 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,11 +1,11 @@
Package: shinyBS
Type: Package
Title: Twitter Bootstrap Components for Shiny
-Version: 0.50
-Date: 2015-03-19
+Version: 0.60
+Date: 2015-03-25
Author: Eric Bailey
-Maintainer: Eric Bailey
-Description: Adds additional Twitter Bootstrap components to Shiny.
+Maintainer: Eric Bailey
+Description: Adds additional Twitter Bootstrap components to Shiny.
Imports:
shiny (>= 0.11),
htmltools
diff --git a/NAMESPACE b/NAMESPACE
index 65b103a..500df17 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -6,11 +6,13 @@ export(bsAlert)
export(bsButton)
export(bsCollapse)
export(bsCollapsePanel)
+export(bsExample)
export(bsModal)
export(bsPopover)
export(bsTooltip)
export(closeAlert)
export(createAlert)
+export(popify)
export(removePopover)
export(removeTooltip)
export(tipify)
diff --git a/R/Alerts.R b/R/Alerts.R
index 0d8a5ed..6b5ad1a 100644
--- a/R/Alerts.R
+++ b/R/Alerts.R
@@ -37,7 +37,7 @@
#'\code{content} was called \code{message} in previous versions of shinyBS.
#'
#'@examples
-#'\donttest{
+#'\dontrun{
#'library(shiny)
#'library(shinyBS)
#'shinyApp(
diff --git a/R/Buttons.R b/R/Buttons.R
index ba17425..6a1061f 100644
--- a/R/Buttons.R
+++ b/R/Buttons.R
@@ -35,7 +35,7 @@
#'\code{icon} was added to allow placing an icon in the button.
#'
#'@examples
-#'\donttest{
+#'\dontrun{
#'library(shiny)
#'library(shinyBS)
#'shinyApp(
@@ -50,7 +50,7 @@
#' value = 1),
#' bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
#' tags$p("Clicking the first button below changes the disabled state of the second button."),
-#' bsButton("togOne", label = "Toggle 'Block Action Button' disabled status",
+#' bsButton("togOne", label = "Toggle button disabled status",
#' block = TRUE, type = "toggle", value = TRUE),
#' bsButton("actOne", label = "Block Action Button", block = TRUE)
#'
@@ -101,7 +101,7 @@
#' } else if((b > 5 & b < 20) | b > 30) {
#' txt = "I warned you about that."
#' } else if(b >= 20 & b <= 30) {
-#' txt = "You have choosen... wisely."
+#' txt = "You have chosen... wisely."
#' }
#' return(txt)
#' })
diff --git a/R/Collapses.R b/R/Collapses.R
index 4df1c15..d4bca16 100644
--- a/R/Collapses.R
+++ b/R/Collapses.R
@@ -28,7 +28,7 @@
#'shinyBS.
#'
#'@examples
-#'\donttest{
+#'\dontrun{
#'library(shiny)
#'library(shinyBS)
#'
diff --git a/R/Modals.R b/R/Modals.R
index ee7c81b..2ecb733 100644
--- a/R/Modals.R
+++ b/R/Modals.R
@@ -30,7 +30,7 @@
#'size of the modal window. Either \code{small} or \code{large}.
#'
#'@examples
-#'\donttest{
+#'\dontrun{
#'library(shiny)
#'library(shinyBS)
#'
diff --git a/R/Tooltips_and_Popovers.R b/R/Tooltips_and_Popovers.R
index 5825d3b..97f9a32 100644
--- a/R/Tooltips_and_Popovers.R
+++ b/R/Tooltips_and_Popovers.R
@@ -6,12 +6,18 @@
#'you could add a popover to an output providing further analysis of that output.
#'
#'@section Components:
-#'There are six functions in the Tooltips and Popovers family:
+#'There are eight functions in the Tooltips and Popovers family:
#' \describe{
#' \item{\code{\link{bsTooltip}}}{Used in the UI to add a tooltip to an element
#' in your UI.}
#' \item{\code{\link{bsPopover}}}{Used in the UI to add a popover to an element
#' in your UI.}
+#' \item{\code{\link{tipify}}}{Wrap any UI element in \code{tipify} to add a
+#' tooltip to the wrapped element. Preferred for elemented created with
+#' \code{\link{renderUI}}.}
+#' \item{\code{\link{popify}}}{Wrap any UI element in \code{popify} to add a
+#' popover to the wrapped element. Preferred for elements created with
+#' \code{\link{renderUI}}.}
#' \item{\code{\link{addTooltip}}}{Used in the Server logic to add a tooltip
#' to an element in your UI.}
#' \item{\code{\link{addPopover}}}{Used in the Server logic to add a popover
@@ -26,7 +32,10 @@
#'You can create tooltips and popovers from either the UI script or within the
#'Server logic. \code{\link{bsTooltip}} and \code{\link{bsPopover}} are used in
#'the UI, and \code{\link{addTooltip}} and \code{\link{addPopover}} are used in
-#'the Server logic.
+#'the Server logic. \code{\link{tipify}} and \code{\link{popify}} can be used
+#'within the UI or from within a \code{\link{renderUI}} in the Server logic. They
+#'also have the added advantage of not requiring that the UI element have an ID
+#'attribute.
#'
#'@note
#'Tooltips and Popovers cannot contain shiny inputs or outputs.
@@ -47,7 +56,7 @@
#'details.
#'
#'@examples
-#'\donttest{
+#'\dontrun{
#'library(shiny)
#'library(shinyBS)
#'shinyApp(
@@ -64,7 +73,8 @@
#' "right", options = list(container = "body"))
#' ),
#' mainPanel(
-#' plotOutput("distPlot")
+#' plotOutput("distPlot"),
+#' uiOutput("uiExample")
#' )
#' )
#' ),
@@ -80,6 +90,15 @@
#' hist(x, breaks = bins, col = 'darkgray', border = 'white')
#'
#' })
+#' output$uiExample <- renderUI({
+#' tags$span(
+#' popify(bsButton("pointlessButton", "Button", style = "primary", size = "large"),
+#' "A Pointless Button",
+#' "This button is pointless. It does not do anything!"),
+#' tipify(bsButton("pB2", "Button", style = "inverse", size = "extra-small"),
+#' "This button is pointless too!")
+#' )
+#' })
#' addPopover(session, "distPlot", "Data", content = paste0("Waiting time between ",
#' "eruptions and the duration of the eruption for the Old Faithful geyser ",
#' "in Yellowstone National Park, Wyoming, USA.
Azzalini, A. and ",
@@ -107,7 +126,7 @@ createTooltipOrPopoverOnUI <- function(id, type, options) {
options = paste0("{'", paste(names(options), options, sep = "': '", collapse = "', '"), "'}")
- bsTag <- shiny::tags$script(HTML(paste0("$(document).ready(function() {setTimeout(function() {shinyBS.addTooltip('", id, "', '", type, "', ", options, ")}, 500)});")))
+ bsTag <- shiny::tags$script(shiny::HTML(paste0("$(document).ready(function() {setTimeout(function() {shinyBS.addTooltip('", id, "', '", type, "', ", options, ")}, 500)});")))
htmltools::attachDependencies(bsTag, shinyBSDep)
@@ -121,7 +140,7 @@ buildTooltipOrPopoverOptionsList <- function(title, placement, trigger, options,
if(!missing(content)) {
if(is.null(options$content)) {
- options$content = HTML(content)
+ options$content = shiny::HTML(content)
}
}
diff --git a/R/addPopover.R b/R/addPopover.R
index c90a2e1..aadf0b1 100644
--- a/R/addPopover.R
+++ b/R/addPopover.R
@@ -8,9 +8,9 @@
#'@param title The title of the popover.
#'@param content The main content of the popover.
#'@param placement Where the popover should appear relative to its target
-#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.
+#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{bottom}.
#'@param trigger What action should cause the popover to appear? (\code{hover},
-#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.
+#'\code{focus}, \code{click}, or \code{manual}). Defaults to \code{hover}.
#'@param options A named list of additional options to be set on the popover.
#'
#'@templateVar item_name addPopover
diff --git a/R/addTooltip.R b/R/addTooltip.R
index c7f8791..f12af41 100644
--- a/R/addTooltip.R
+++ b/R/addTooltip.R
@@ -9,7 +9,7 @@
#'@param placement Where the tooltip should appear relative to its target
#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.
#'@param trigger What action should cause the tooltip to appear? (\code{hover},
-#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.
+#'\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.
#'@param options A named list of additional options to be set on the tooltip.
#'
#'@templateVar item_name addTooltip
diff --git a/R/bsExample.R b/R/bsExample.R
new file mode 100644
index 0000000..ce758a7
--- /dev/null
+++ b/R/bsExample.R
@@ -0,0 +1,41 @@
+#'bsExample
+#'
+#'A function to view examples of shinyBS functionality. Will run the examples
+#'found in the examples sections of shinyBS documentation. Use this instead of
+#'\code{example}.
+#'
+#'@param family A shinyBS family name
+#'@param display.mode The display mode to use when running the example. See
+#'\code{\link{runApp}}.
+#'@param \dots Other parameters to pass to \code{\link{runApp}}.
+#'
+#'@details
+#'This function is just a wrapper for \code{\link{runApp}} that runs copies of the
+#'examples found in the family documention pages of \code{shinyBS}. By default,
+#'\code{display.mode} is set to \code{showcase} so you can see the code while
+#'the app is running.
+#'
+#'@examples
+#'\dontrun{
+#' bsExample("Alerts")}
+#'@export
+bsExample <- function(family, display.mode = "showcase", ...) {
+
+ exp <- system.file("examples", package="shinyBS")
+ fams <- list.dirs(exp, full.names = FALSE, recursive = FALSE)
+
+ appname <- gsub(" ", "", family, fixed = TRUE)
+ appname <- gsub("_", "", appname, fixed = TRUE)
+
+ if(appname %in% fams) {
+
+ appname <- normalizePath(paste0(exp, "/", appname))
+ shiny::runApp(appname, display.mode = display.mode, ...)
+
+ } else {
+
+ stop("Could not find shinyBS family: ", family, "\nAvailable families are: ", paste0(fams, collapse = ", "))
+
+ }
+
+}
\ No newline at end of file
diff --git a/R/bsPopover.R b/R/bsPopover.R
index 23b6a52..28f190a 100644
--- a/R/bsPopover.R
+++ b/R/bsPopover.R
@@ -9,7 +9,7 @@
#'@param placement Where the popover should appear relative to its target
#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.
#'@param trigger What action should cause the popover to appear? (\code{hover},
-#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.
+#'\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.
#'@param options A named list of additional options to be set on the popover.
#'
#'@templateVar item_name bsPopover
diff --git a/R/bsTooltip.R b/R/bsTooltip.R
index 1b97a73..ae04f6e 100644
--- a/R/bsTooltip.R
+++ b/R/bsTooltip.R
@@ -8,7 +8,7 @@
#'@param placement Where the tooltip should appear relative to its target
#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.
#'@param trigger What action should cause the tooltip to appear? (\code{hover},
-#'\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.
+#'\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.
#'@param options A named list of additional options to be set on the tooltip.
#'
#'@templateVar item_name bsTooltip
diff --git a/R/closeAlert.R b/R/closeAlert.R
index 06b041f..f96b328 100644
--- a/R/closeAlert.R
+++ b/R/closeAlert.R
@@ -3,6 +3,7 @@
#'\code{closeAlert} is used within your Server logic to close an alert that you
#'created with \code{\link{createAlert}}.
#'
+#'@param alertId The id of the alert to be dismissed.
#'@inheritParams createAlert
#'
#'@templateVar item_name closeAlert
diff --git a/R/createAlert.R b/R/createAlert.R
index a07b1a7..16d8807 100644
--- a/R/createAlert.R
+++ b/R/createAlert.R
@@ -10,7 +10,7 @@
#'@param title \bold{Optional} A title for the Alert.
#'@param content The main body of the Alert. HTML tags are allowed.
#'@param style A bootstrap style to apply. Defaults to \code{info}.
-#'@param dismiss \bold{logical} Should the Alert be user dismissable? Defaults to \code{TRUE}.
+#'@param dismiss \code{logical} Should the Alert be user dismissable? Defaults to \code{TRUE}.
#'@param append \code{logical} Should the Alert be appended below existing Alerts? Default to \code{TRUE}.
#'
#'@templateVar item_name createAlert
diff --git a/R/popify.R b/R/popify.R
new file mode 100644
index 0000000..1020145
--- /dev/null
+++ b/R/popify.R
@@ -0,0 +1,36 @@
+#'popify
+#'
+#'\code{popify} can be wrapped around any shiny UI element to add a popover to the
+#'wrapped element. This should be a safer way to add popovers to elements created with
+#'\code{\link{renderUI}}.
+#'
+#'@param el A shiny UI element.
+#'@param title The title of the popover.
+#'@param content The main content of the popover.
+#'@param placement Where the popover should appear relative to its target
+#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.
+#'@param trigger What action should cause the popover to appear? (\code{hover},
+#'\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.
+#'@param options A named list of additional options to be set on the popover.
+#'
+#'@templateVar item_name popify
+#'@templateVar family_name Tooltips_and_Popovers
+#'@template item_details
+#'@template footer
+#'@export
+popify <- function(el, title, content, placement="bottom", trigger="hover", options = NULL) {
+
+ id <- el$attribs$id
+
+ if(is.null(id)) {
+ id <- paste0("tipify", as.integer(runif(1, 1, 10000000)))
+ el <- addAttribs(el, id = id)
+ }
+
+ options = buildTooltipOrPopoverOptionsList(title, placement, trigger, options, content)
+
+ script <- createTooltipOrPopoverOnUI(id, "popover", options)
+
+ return(shiny::tagList(el, script))
+
+}
\ No newline at end of file
diff --git a/R/shinyBS.R b/R/shinyBS.R
deleted file mode 100644
index e69de29..0000000
diff --git a/R/tipify.R b/R/tipify.R
index 2d4807a..659d53f 100644
--- a/R/tipify.R
+++ b/R/tipify.R
@@ -1,3 +1,21 @@
+#'tipify
+#'
+#'\code{tipify} can be wrapped around any shiny UI element to add a tooltip to the
+#'wrapped element. This should be a safer way to add tooltips to elements created with
+#'\code{\link{renderUI}}.
+#'
+#'@param el A shiny UI element.
+#'@param title The content of the tooltip.
+#'@param placement Where the tooltip should appear relative to its target
+#'(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.
+#'@param trigger What action should cause the tooltip to appear? (\code{hover},
+#'\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.
+#'@param options A named list of additional options to be set on the tooltip.
+#'
+#'@templateVar item_name tipify
+#'@templateVar family_name Tooltips_and_Popovers
+#'@template item_details
+#'@template footer
#'@export
tipify <- function(el, title, placement="bottom", trigger="hover", options = NULL) {
@@ -12,6 +30,6 @@ tipify <- function(el, title, placement="bottom", trigger="hover", options = NUL
script <- createTooltipOrPopoverOnUI(id, "tooltip", options)
- return(tagList(el, script))
+ return(shiny::tagList(el, script))
}
\ No newline at end of file
diff --git a/inst/examples/Alerts/server.R b/inst/examples/Alerts/server.R
new file mode 100644
index 0000000..b1eee03
--- /dev/null
+++ b/inst/examples/Alerts/server.R
@@ -0,0 +1,22 @@
+library(shiny)
+library(shinyBS)
+shinyServer(
+ function(input, output, session) {
+ output$exampleOutput <- renderText({
+ num1 <- as.numeric(input$num1)
+ num2 <- as.numeric(input$num2)
+
+ if(is.na(num1) | is.na(num2)) {
+ createAlert(session, "alert", "exampleAlert", title = "Oops",
+ content = "Both inputs should be numeric.", append = FALSE)
+ } else if(num2 == 0) {
+ createAlert(session, "alert", "exampleAlert", title = "Oops",
+ content = "You cannot divide by 0.", append = FALSE)
+ } else {
+ closeAlert(session, "exampleAlert")
+ return(num1/num2)
+ }
+
+ })
+ }
+)
diff --git a/inst/examples/Alerts/ui.R b/inst/examples/Alerts/ui.R
new file mode 100644
index 0000000..6378a91
--- /dev/null
+++ b/inst/examples/Alerts/ui.R
@@ -0,0 +1,13 @@
+library(shiny)
+library(shinyBS)
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(textInput("num1", NULL, value = 100),
+ "divided by", textInput("num2", NULL, value = 20),
+ "equals", textOutput("exampleOutput")),
+ mainPanel(
+ bsAlert("alert")
+ )
+ )
+)
+
diff --git a/inst/examples/Buttons/server.R b/inst/examples/Buttons/server.R
new file mode 100644
index 0000000..e0a21c1
--- /dev/null
+++ b/inst/examples/Buttons/server.R
@@ -0,0 +1,49 @@
+library(shiny)
+library(shinyBS)
+shinyServer(
+ function(input, output, session) {
+ observeEvent(input$togOne, ({
+ updateButton(session, "actOne", disabled = !input$togOne)
+ }))
+ observeEvent(input$bins, ({
+
+ b <- input$bins
+ disabled = NULL
+ style = "default"
+ icon = ""
+
+ if(b < 5) {
+ disabled = TRUE
+ icon <- icon("ban")
+ } else {
+ disabled = FALSE
+ }
+
+ if(b < 15 | b > 35) {
+ style = "danger"
+ } else if(b < 20 | b > 30) {
+ style = "warning"
+ } else {
+ style = "default"
+ icon = icon("check")
+ }
+
+ updateButton(session, "actTwo", disabled = disabled, style = style, icon = icon)
+
+ }))
+
+ output$exampleText <- renderText({
+ input$actTwo
+ b <- isolate(input$bins)
+ txt = ""
+ if((b > 5 & b < 15) | b > 35) {
+ txt = "That was dangerous."
+ } else if((b > 5 & b < 20) | b > 30) {
+ txt = "I warned you about that."
+ } else if(b >= 20 & b <= 30) {
+ txt = "You have chosen... wisely."
+ }
+ return(txt)
+ })
+ }
+)
diff --git a/inst/examples/Buttons/ui.R b/inst/examples/Buttons/ui.R
new file mode 100644
index 0000000..7b37a05
--- /dev/null
+++ b/inst/examples/Buttons/ui.R
@@ -0,0 +1,23 @@
+library(shiny)
+library(shinyBS)
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(
+ sliderInput("bins",
+ "Move the slider to see its effect on the button below:",
+ min = 1,
+ max = 50,
+ value = 1),
+ bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
+ tags$p("Clicking the first button below changes the disabled state of the second button."),
+ bsButton("togOne", label = "Toggle button disabled status",
+ block = TRUE, type = "toggle", value = TRUE),
+ bsButton("actOne", label = "Block Action Button", block = TRUE)
+
+ ),
+ mainPanel(
+ textOutput("exampleText")
+ )
+ )
+)
+
diff --git a/inst/examples/Collapses/server.R b/inst/examples/Collapses/server.R
new file mode 100644
index 0000000..c2fac84
--- /dev/null
+++ b/inst/examples/Collapses/server.R
@@ -0,0 +1,13 @@
+library(shiny)
+library(shinyBS)
+shinyServer(
+ function(input, output, session) {
+ output$genericPlot <- renderPlot(plot(rnorm(100)))
+ observeEvent(input$p1Button, ({
+ updateCollapse(session, "collapseExample", open = "Panel 1")
+ }))
+ observeEvent(input$styleSelect, ({
+ updateCollapse(session, "collapseExample", style = list("Panel 1" = input$styleSelect))
+ }))
+ }
+)
diff --git a/inst/examples/Collapses/ui.R b/inst/examples/Collapses/ui.R
new file mode 100644
index 0000000..0dd53a7
--- /dev/null
+++ b/inst/examples/Collapses/ui.R
@@ -0,0 +1,21 @@
+library(shiny)
+library(shinyBS)
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(HTML("This button will open Panel 1 using updateCollapse."),
+ actionButton("p1Button", "Push Me!"),
+ selectInput("styleSelect", "Select style for Panel 1",
+ c("default", "primary", "danger", "warning", "info", "success"))
+ ),
+ mainPanel(
+ bsCollapse(id = "collapseExample", open = "Panel 2",
+ bsCollapsePanel("Panel 1", "This is a panel with just text ",
+ "and has the default style. You can change the style in ",
+ "the sidebar.", style = "info"),
+ bsCollapsePanel("Panel 2", "This panel has a generic plot. ",
+ "and a 'success' style.", plotOutput("genericPlot"), style = "success")
+ )
+ )
+ )
+)
+
diff --git a/inst/examples/Modals/server.R b/inst/examples/Modals/server.R
new file mode 100644
index 0000000..174fde5
--- /dev/null
+++ b/inst/examples/Modals/server.R
@@ -0,0 +1,33 @@
+library(shiny)
+library(shinyBS)
+shinyServer(
+ function(input, output, session) {
+
+ output$distPlot <- renderPlot({
+
+ x <- faithful[, 2]
+ bins <- seq(min(x), max(x), length.out = input$bins + 1)
+
+ # draw the histogram with the specified number of bins
+ hist(x, breaks = bins, col = 'darkgray', border = 'white')
+
+ })
+
+ output$distTable <- renderDataTable({
+
+ x <- faithful[, 2]
+ bins <- seq(min(x), max(x), length.out = input$bins + 1)
+
+ # draw the histogram with the specified number of bins
+ tab <- hist(x, breaks = bins, plot = FALSE)
+ tab$breaks <- sapply(seq(length(tab$breaks) - 1), function(i) {
+ paste0(signif(tab$breaks[i], 3), "-", signif(tab$breaks[i+1], 3))
+ })
+ tab <- as.data.frame(do.call(cbind, tab))
+ colnames(tab) <- c("Bins", "Counts", "Density")
+ return(tab[, 1:3])
+
+ }, options = list(pageLength=10))
+
+ }
+)
diff --git a/inst/examples/Modals/ui.R b/inst/examples/Modals/ui.R
new file mode 100644
index 0000000..bc0170a
--- /dev/null
+++ b/inst/examples/Modals/ui.R
@@ -0,0 +1,21 @@
+library(shiny)
+library(shinyBS)
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(
+ sliderInput("bins",
+ "Number of bins:",
+ min = 1,
+ max = 50,
+ value = 30),
+ actionButton("tabBut", "View Table")
+ ),
+
+ mainPanel(
+ plotOutput("distPlot"),
+ bsModal("modalExample", "Data Table", "tabBut", size = "large",
+ dataTableOutput("distTable"))
+ )
+ )
+)
+
diff --git a/inst/examples/TooltipsandPopovers/server.R b/inst/examples/TooltipsandPopovers/server.R
new file mode 100644
index 0000000..30ee3c4
--- /dev/null
+++ b/inst/examples/TooltipsandPopovers/server.R
@@ -0,0 +1,30 @@
+library(shiny)
+library(shinyBS)
+shinyServer(
+ function(input, output, session) {
+ output$distPlot <- renderPlot({
+
+ # generate bins based on input$bins from ui.R
+ x <- faithful[, 2]
+ bins <- seq(min(x), max(x), length.out = input$bins + 1)
+
+ # draw the histogram with the specified number of bins
+ hist(x, breaks = bins, col = 'darkgray', border = 'white')
+
+ })
+ output$uiExample <- renderUI({
+ tags$span(
+ popify(bsButton("pointlessButton", "Button", style = "primary", size = "large"),
+ "A Pointless Button",
+ "This button is pointless. It does not do anything!"),
+ tipify(bsButton("pB2", "Button", style = "inverse", size = "extra-small"),
+ "This button is pointless too!")
+ )
+ })
+ addPopover(session, "distPlot", "Data", content = paste0("
Waiting time between ",
+ "eruptions and the duration of the eruption for the Old Faithful geyser ",
+ "in Yellowstone National Park, Wyoming, USA.
Azzalini, A. and ",
+ "Bowman, A. W. (1990). A look at some data on the Old Faithful geyser. ",
+ "Applied Statistics 39, 357-365.
"), trigger = 'click')
+ }
+)
diff --git a/inst/examples/TooltipsandPopovers/ui.R b/inst/examples/TooltipsandPopovers/ui.R
new file mode 100644
index 0000000..4756d56
--- /dev/null
+++ b/inst/examples/TooltipsandPopovers/ui.R
@@ -0,0 +1,20 @@
+library(shiny)
+library(shinyBS)
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(
+ sliderInput("bins",
+ "Number of bins:",
+ min = 1,
+ max = 50,
+ value = 30),
+ bsTooltip("bins", "The wait times will be broken into this many equally spaced bins",
+ "right", options = list(container = "body"))
+ ),
+ mainPanel(
+ plotOutput("distPlot"),
+ uiOutput("uiExample")
+ )
+ )
+)
+
diff --git a/inst/tests/tipify_test.R b/inst/tests/tipify_test.R
new file mode 100644
index 0000000..1a91ca5
--- /dev/null
+++ b/inst/tests/tipify_test.R
@@ -0,0 +1,35 @@
+library(shiny)
+library(shinyBS)
+
+shinyApp(
+ ui =
+ fluidPage(
+ tabsetPanel(
+ tabPanel("Tab #1",
+ plotOutput("genericPlot")
+ ),
+ tabPanel("Tab #2",
+ checkboxInput("showOptions", "Show Options"),
+ uiOutput("ui_multiview_customize"),
+ plotOutput("multiview_plot")
+ )
+ )
+ ),
+ server =
+ function(input, output, session) {
+ output$genericPlot <- renderPlot(plot(rnorm(1000)))
+ output$multiview_plot <- renderPlot(plot(runif(1000)))
+ output$ui_multiview_customize <- renderUI({
+ if(input$showOptions) {
+ bsCollapse(
+ bsCollapsePanel(title = "View Options",
+ checkboxInput("multiview_checkbox", label = "Include warmup", value = FALSE),
+ hr(),
+ tipify(downloadButton("download_multiview", "Save as ggplot2 objects"),
+ title = "Save ggplot2 object in .RData file.", placement="right")
+ )
+ )
+ }
+ })
+ }
+)
diff --git a/inst/tests/tipify_test2.R b/inst/tests/tipify_test2.R
new file mode 100644
index 0000000..b6ccf28
--- /dev/null
+++ b/inst/tests/tipify_test2.R
@@ -0,0 +1,46 @@
+library(shiny)
+library(shinyBS)
+
+app <- shinyApp(
+ ui =
+ fluidPage(
+ sidebarLayout(
+ sidebarPanel(HTML("This button will open Panel 1 using updateCollapse."),
+ actionButton("p1Button", "Push Me!"),
+ selectInput("styleSelect", "Select style for Panel 1",
+ c("default", "primary", "danger", "warning", "info", "success"))
+ ),
+ mainPanel(
+ bsCollapse(id = "collapseExample", open = "Panel 2",
+ bsCollapsePanel("Panel 1", "This is a panel with just text ",
+ "and has the default style. You can change the style in ",
+ "the sidebar.", style = "info"),
+ bsCollapsePanel("Panel 2", "This panel has a generic plot. ",
+ "and a 'success' style.", plotOutput("genericPlot"), style = "success")
+ ),
+
+ uiOutput("tooltip_test"),
+ actionButton("test2", "Test2"),
+ bsTooltip("test2", title = "Test2", placement="right"),
+ tipify(tags$button("Hello"), "Test without ID")
+
+ )
+ )
+ ),
+ server =
+ function(input, output, session) {
+ output$genericPlot <- renderPlot(plot(rnorm(100)))
+ observeEvent(input$p1Button, ({
+ updateCollapse(session, "collapseExample", open = "Panel 1")
+ }))
+ observeEvent(input$styleSelect, ({
+ updateCollapse(session, "collapseExample", style = list("Panel 1" = input$styleSelect))
+ }))
+
+ output$tooltip_test <- renderUI({
+ tipify(actionButton("test", "Test"), title = "test", placement = "right")
+ })
+ }
+)
+
+runApp(app)
\ No newline at end of file
diff --git a/man-roxygen/footer.R b/man-roxygen/footer.R
index 0abb5ed..17615e5 100644
--- a/man-roxygen/footer.R
+++ b/man-roxygen/footer.R
@@ -1,8 +1,8 @@
#'@seealso \href{http://getbootstrap.com}{Twitter Bootstrap 3}
#'
#'@note
-#' Run \code{example("<%=family_name %>", "shinyBS", ask = FALSE)} for an example
-#' of <%=item_name %> functionality
+#' Run \code{bsExample("<%=family_name %>")} for an example
+#' of \code{<%=item_name %>} functionality.
#'
#'@family <%=family_name %>
#'@name <%=item_name %>
diff --git a/man/Alerts.Rd b/man/Alerts.Rd
index fa792fd..c2829df 100644
--- a/man/Alerts.Rd
+++ b/man/Alerts.Rd
@@ -21,8 +21,8 @@ not use \code{createAlert} to give the user info about what they need to
change.
}
\note{
-Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
-of Alerts functionality
+Run \code{bsExample("Alerts")} for an example
+of \code{Alerts} functionality.
}
\section{Components}{
@@ -48,7 +48,7 @@ There are three functions in the Alerts family:
\code{content} was called \code{message} in previous versions of shinyBS.
}
\examples{
-\donttest{
+\dontrun{
library(shiny)
library(shinyBS)
shinyApp(
diff --git a/man/Buttons.Rd b/man/Buttons.Rd
index 4634027..8625323 100644
--- a/man/Buttons.Rd
+++ b/man/Buttons.Rd
@@ -24,8 +24,8 @@ the button to \code{style = "success"} to let them know that the button is ready
to be clicked.
}
\note{
-Run \code{example("Buttons", "shinyBS", ask = FALSE)} for an example
-of Buttons functionality
+Run \code{bsExample("Buttons")} for an example
+of \code{Buttons} functionality.
}
\section{Components}{
@@ -46,7 +46,7 @@ There are two functions in the Buttons family:
\code{icon} was added to allow placing an icon in the button.
}
\examples{
-\donttest{
+\dontrun{
library(shiny)
library(shinyBS)
shinyApp(
@@ -61,7 +61,7 @@ shinyApp(
value = 1),
bsButton("actTwo", label = "Click me if you dare!", icon = icon("ban")),
tags$p("Clicking the first button below changes the disabled state of the second button."),
- bsButton("togOne", label = "Toggle 'Block Action Button' disabled status",
+ bsButton("togOne", label = "Toggle button disabled status",
block = TRUE, type = "toggle", value = TRUE),
bsButton("actOne", label = "Block Action Button", block = TRUE)
@@ -112,7 +112,7 @@ shinyApp(
} else if((b > 5 & b < 20) | b > 30) {
txt = "I warned you about that."
} else if(b >= 20 & b <= 30) {
- txt = "You have choosen... wisely."
+ txt = "You have chosen... wisely."
}
return(txt)
})
diff --git a/man/Collapses.Rd b/man/Collapses.Rd
index 73ee353..87d5959 100644
--- a/man/Collapses.Rd
+++ b/man/Collapses.Rd
@@ -21,8 +21,8 @@ from the input object passed to the function in \code{\link{shinyServer}}.
collapse panels or to change their style.
}
\note{
-Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
-of Collapses functionality
+Run \code{bsExample("Collapses")} for an example
+of \code{Collapses} functionality.
}
\section{Components}{
@@ -39,7 +39,7 @@ of Collapses functionality
shinyBS.
}
\examples{
-\donttest{
+\dontrun{
library(shiny)
library(shinyBS)
diff --git a/man/Modals.Rd b/man/Modals.Rd
index a66d5b3..e03c286 100644
--- a/man/Modals.Rd
+++ b/man/Modals.Rd
@@ -19,8 +19,8 @@ Create a button or link and assign its \code{inputId} as the \code{trigger}
in \code{\link{bsModal}}.
}
\note{
-Run \code{example("Modals", "shinyBS", ask = FALSE)} for an example
-of Modals functionality
+Run \code{bsExample("Modals")} for an example
+of \code{Modals} functionality.
}
\section{Components}{
@@ -41,7 +41,7 @@ The \code{size} argument in \code{\link{bsModal}} allows you to specify the
size of the modal window. Either \code{small} or \code{large}.
}
\examples{
-\donttest{
+\dontrun{
library(shiny)
library(shinyBS)
diff --git a/man/Tooltips_and_Popovers.Rd b/man/Tooltips_and_Popovers.Rd
index ab610c2..10f9343 100644
--- a/man/Tooltips_and_Popovers.Rd
+++ b/man/Tooltips_and_Popovers.Rd
@@ -13,7 +13,10 @@ you could add a popover to an output providing further analysis of that output.
You can create tooltips and popovers from either the UI script or within the
Server logic. \code{\link{bsTooltip}} and \code{\link{bsPopover}} are used in
the UI, and \code{\link{addTooltip}} and \code{\link{addPopover}} are used in
-the Server logic.
+the Server logic. \code{\link{tipify}} and \code{\link{popify}} can be used
+within the UI or from within a \code{\link{renderUI}} in the Server logic. They
+also have the added advantage of not requiring that the UI element have an ID
+attribute.
}
\note{
Tooltips and Popovers cannot contain shiny inputs or outputs.
@@ -27,17 +30,23 @@ Tooltips and popovers may not work on some of the more complex shiny inputs
or outputs. If you encounter a problem with tooltips or popovers not appearing
please file a issue on the github page so I can fix it.
-Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
-of Tooltips_and_Popovers functionality
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{Tooltips_and_Popovers} functionality.
}
\section{Components}{
-There are six functions in the Tooltips and Popovers family:
+There are eight functions in the Tooltips and Popovers family:
\describe{
\item{\code{\link{bsTooltip}}}{Used in the UI to add a tooltip to an element
in your UI.}
\item{\code{\link{bsPopover}}}{Used in the UI to add a popover to an element
in your UI.}
+ \item{\code{\link{tipify}}}{Wrap any UI element in \code{tipify} to add a
+ tooltip to the wrapped element. Preferred for elemented created with
+ \code{\link{renderUI}}.}
+ \item{\code{\link{popify}}}{Wrap any UI element in \code{popify} to add a
+ popover to the wrapped element. Preferred for elements created with
+ \code{\link{renderUI}}.}
\item{\code{\link{addTooltip}}}{Used in the Server logic to add a tooltip
to an element in your UI.}
\item{\code{\link{addPopover}}}{Used in the Server logic to add a popover
@@ -57,7 +66,7 @@ the \href{http://getbootstrap.com}{Twitter Bootstrap 3 documentation} for more
details.
}
\examples{
-\donttest{
+\dontrun{
library(shiny)
library(shinyBS)
shinyApp(
@@ -74,7 +83,8 @@ shinyApp(
"right", options = list(container = "body"))
),
mainPanel(
- plotOutput("distPlot")
+ plotOutput("distPlot"),
+ uiOutput("uiExample")
)
)
),
@@ -90,6 +100,15 @@ shinyApp(
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
+ output$uiExample <- renderUI({
+ tags$span(
+ popify(bsButton("pointlessButton", "Button", style = "primary", size = "large"),
+ "A Pointless Button",
+ "This button is pointless. It does not do anything!"),
+ tipify(bsButton("pB2", "Button", style = "inverse", size = "extra-small"),
+ "This button is pointless too!")
+ )
+ })
addPopover(session, "distPlot", "Data", content = paste0("Waiting time between ",
"eruptions and the duration of the eruption for the Old Faithful geyser ",
"in Yellowstone National Park, Wyoming, USA.
Azzalini, A. and ",
@@ -104,7 +123,8 @@ shinyApp(
Other Tooltips_and_Popovers: \code{\link{addPopover}};
\code{\link{addTooltip}}; \code{\link{bsPopover}};
- \code{\link{bsTooltip}}; \code{\link{removePopover}};
- \code{\link{removeTooltip}}
+ \code{\link{bsTooltip}}; \code{\link{popify}};
+ \code{\link{removePopover}}; \code{\link{removeTooltip}};
+ \code{\link{tipify}}
}
diff --git a/man/addPopover.Rd b/man/addPopover.Rd
index fd45863..36b3c6d 100644
--- a/man/addPopover.Rd
+++ b/man/addPopover.Rd
@@ -17,10 +17,10 @@ addPopover(session, id, title, content, placement = "bottom",
\item{content}{The main content of the popover.}
\item{placement}{Where the popover should appear relative to its target
-(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
+(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{bottom}.}
\item{trigger}{What action should cause the popover to appear? (\code{hover},
-\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+\code{focus}, \code{click}, or \code{manual}). Defaults to \code{hover}.}
\item{options}{A named list of additional options to be set on the popover.}
}
@@ -33,15 +33,16 @@ See \link{Tooltips_and_Popovers} for more information about how to use \code{add
rest of the Tooltips_and_Popovers family.
}
\note{
-Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
-of addPopover functionality
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{addPopover} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
\code{\link{addTooltip}}; \code{\link{bsPopover}};
- \code{\link{bsTooltip}}; \code{\link{removePopover}};
- \code{\link{removeTooltip}}
+ \code{\link{bsTooltip}}; \code{\link{popify}};
+ \code{\link{removePopover}}; \code{\link{removeTooltip}};
+ \code{\link{tipify}}
}
diff --git a/man/addTooltip.Rd b/man/addTooltip.Rd
index 82cf2ac..7049d87 100644
--- a/man/addTooltip.Rd
+++ b/man/addTooltip.Rd
@@ -18,7 +18,7 @@ addTooltip(session, id, title, placement = "bottom", trigger = "hover",
(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
\item{trigger}{What action should cause the tooltip to appear? (\code{hover},
-\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.}
\item{options}{A named list of additional options to be set on the tooltip.}
}
@@ -31,15 +31,16 @@ See \link{Tooltips_and_Popovers} for more information about how to use \code{add
rest of the Tooltips_and_Popovers family.
}
\note{
-Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
-of addTooltip functionality
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{addTooltip} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
\code{\link{addPopover}}; \code{\link{bsPopover}};
- \code{\link{bsTooltip}}; \code{\link{removePopover}};
- \code{\link{removeTooltip}}
+ \code{\link{bsTooltip}}; \code{\link{popify}};
+ \code{\link{removePopover}}; \code{\link{removeTooltip}};
+ \code{\link{tipify}}
}
diff --git a/man/bsAlert.Rd b/man/bsAlert.Rd
index cc75c5a..351fe5e 100644
--- a/man/bsAlert.Rd
+++ b/man/bsAlert.Rd
@@ -18,8 +18,8 @@ See \link{Alerts} for more information about how to use \code{bsAlert} with the
rest of the Alerts family.
}
\note{
-Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
-of bsAlert functionality
+Run \code{bsExample("Alerts")} for an example
+of \code{bsAlert} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/bsButton.Rd b/man/bsButton.Rd
index 3d9a3a9..517fcf9 100644
--- a/man/bsButton.Rd
+++ b/man/bsButton.Rd
@@ -42,8 +42,8 @@ See \link{Buttons} for more information about how to use \code{bsButton} with th
rest of the Buttons family.
}
\note{
-Run \code{example("Buttons", "shinyBS", ask = FALSE)} for an example
-of bsButton functionality
+Run \code{bsExample("Buttons")} for an example
+of \code{bsButton} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/bsCollapse.Rd b/man/bsCollapse.Rd
index b20d5d7..8d887df 100644
--- a/man/bsCollapse.Rd
+++ b/man/bsCollapse.Rd
@@ -27,8 +27,8 @@ See \link{Collapses} for more information about how to use \code{bsCollapse} wit
rest of the Collapses family.
}
\note{
-Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
-of bsCollapse functionality
+Run \code{bsExample("Collapses")} for an example
+of \code{bsCollapse} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/bsCollapsePanel.Rd b/man/bsCollapsePanel.Rd
index 580f7f9..2f1d410 100644
--- a/man/bsCollapsePanel.Rd
+++ b/man/bsCollapsePanel.Rd
@@ -23,8 +23,8 @@ See \link{Collapses} for more information about how to use \code{bsCollapsePanel
rest of the Collapses family.
}
\note{
-Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
-of bsCollapsePanel functionality
+Run \code{bsExample("Collapses")} for an example
+of \code{bsCollapsePanel} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/bsExample.Rd b/man/bsExample.Rd
new file mode 100644
index 0000000..624b627
--- /dev/null
+++ b/man/bsExample.Rd
@@ -0,0 +1,32 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsExample.R
+\name{bsExample}
+\alias{bsExample}
+\title{bsExample}
+\usage{
+bsExample(family, display.mode = "showcase", ...)
+}
+\arguments{
+\item{family}{A shinyBS family name}
+
+\item{display.mode}{The display mode to use when running the example. See
+\code{\link{runApp}}.}
+
+\item{\dots}{Other parameters to pass to \code{\link{runApp}}.}
+}
+\description{
+A function to view examples of shinyBS functionality. Will run the examples
+found in the examples sections of shinyBS documentation. Use this instead of
+\code{example}.
+}
+\details{
+This function is just a wrapper for \code{\link{runApp}} that runs copies of the
+examples found in the family documention pages of \code{shinyBS}. By default,
+\code{display.mode} is set to \code{showcase} so you can see the code while
+the app is running.
+}
+\examples{
+\dontrun{
+ bsExample("Alerts")}
+}
+
diff --git a/man/bsModal.Rd b/man/bsModal.Rd
index 8882180..0ae2e2f 100644
--- a/man/bsModal.Rd
+++ b/man/bsModal.Rd
@@ -25,8 +25,8 @@ See \link{Modals} for more information about how to use \code{bsModal} with the
rest of the Modals family.
}
\note{
-Run \code{example("Modals", "shinyBS", ask = FALSE)} for an example
-of bsModal functionality
+Run \code{bsExample("Modals")} for an example
+of \code{bsModal} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/bsPopover.Rd b/man/bsPopover.Rd
index a8f26c3..3cdc3af 100644
--- a/man/bsPopover.Rd
+++ b/man/bsPopover.Rd
@@ -18,7 +18,7 @@ bsPopover(id, title, content, placement = "bottom", trigger = "hover",
(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
\item{trigger}{What action should cause the popover to appear? (\code{hover},
-\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.}
\item{options}{A named list of additional options to be set on the popover.}
}
@@ -31,15 +31,16 @@ See \link{Tooltips_and_Popovers} for more information about how to use \code{bsP
rest of the Tooltips_and_Popovers family.
}
\note{
-Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
-of bsPopover functionality
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{bsPopover} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
\code{\link{addPopover}}; \code{\link{addTooltip}};
- \code{\link{bsTooltip}}; \code{\link{removePopover}};
- \code{\link{removeTooltip}}
+ \code{\link{bsTooltip}}; \code{\link{popify}};
+ \code{\link{removePopover}}; \code{\link{removeTooltip}};
+ \code{\link{tipify}}
}
diff --git a/man/bsTooltip.Rd b/man/bsTooltip.Rd
index c5ebd4d..1494de7 100644
--- a/man/bsTooltip.Rd
+++ b/man/bsTooltip.Rd
@@ -16,7 +16,7 @@ bsTooltip(id, title, placement = "bottom", trigger = "hover",
(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
\item{trigger}{What action should cause the tooltip to appear? (\code{hover},
-\code{focus}, \code{click}, or \code{manual}. Defaults to \code{"hover"}.}
+\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.}
\item{options}{A named list of additional options to be set on the tooltip.}
}
@@ -29,15 +29,16 @@ See \link{Tooltips_and_Popovers} for more information about how to use \code{bsT
rest of the Tooltips_and_Popovers family.
}
\note{
-Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
-of bsTooltip functionality
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{bsTooltip} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
\code{\link{addPopover}}; \code{\link{addTooltip}};
- \code{\link{bsPopover}}; \code{\link{removePopover}};
- \code{\link{removeTooltip}}
+ \code{\link{bsPopover}}; \code{\link{popify}};
+ \code{\link{removePopover}}; \code{\link{removeTooltip}};
+ \code{\link{tipify}}
}
diff --git a/man/closeAlert.Rd b/man/closeAlert.Rd
index 0ba6798..707330f 100644
--- a/man/closeAlert.Rd
+++ b/man/closeAlert.Rd
@@ -9,7 +9,7 @@ closeAlert(session, alertId)
\arguments{
\item{session}{The session object passed to function given to shinyServer.}
-\item{alertId}{\bold{Optional} A unique identifier for the Alert.}
+\item{alertId}{The id of the alert to be dismissed.}
}
\description{
\code{closeAlert} is used within your Server logic to close an alert that you
@@ -20,8 +20,8 @@ See \link{Alerts} for more information about how to use \code{closeAlert} with t
rest of the Alerts family.
}
\note{
-Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
-of closeAlert functionality
+Run \code{bsExample("Alerts")} for an example
+of \code{closeAlert} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/createAlert.Rd b/man/createAlert.Rd
index 9afacc5..5b6217e 100644
--- a/man/createAlert.Rd
+++ b/man/createAlert.Rd
@@ -21,7 +21,7 @@ displayed.}
\item{style}{A bootstrap style to apply. Defaults to \code{info}.}
-\item{dismiss}{\bold{logical} Should the Alert be user dismissable? Defaults to \code{TRUE}.}
+\item{dismiss}{\code{logical} Should the Alert be user dismissable? Defaults to \code{TRUE}.}
\item{append}{\code{logical} Should the Alert be appended below existing Alerts? Default to \code{TRUE}.}
}
@@ -34,8 +34,8 @@ See \link{Alerts} for more information about how to use \code{createAlert} with
rest of the Alerts family.
}
\note{
-Run \code{example("Alerts", "shinyBS", ask = FALSE)} for an example
-of createAlert functionality
+Run \code{bsExample("Alerts")} for an example
+of \code{createAlert} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/popify.Rd b/man/popify.Rd
new file mode 100644
index 0000000..180135d
--- /dev/null
+++ b/man/popify.Rd
@@ -0,0 +1,47 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/popify.R
+\name{popify}
+\alias{popify}
+\title{popify}
+\usage{
+popify(el, title, content, placement = "bottom", trigger = "hover",
+ options = NULL)
+}
+\arguments{
+\item{el}{A shiny UI element.}
+
+\item{title}{The title of the popover.}
+
+\item{content}{The main content of the popover.}
+
+\item{placement}{Where the popover should appear relative to its target
+(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
+
+\item{trigger}{What action should cause the popover to appear? (\code{hover},
+\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.}
+
+\item{options}{A named list of additional options to be set on the popover.}
+}
+\description{
+\code{popify} can be wrapped around any shiny UI element to add a popover to the
+wrapped element. This should be a safer way to add popovers to elements created with
+\code{\link{renderUI}}.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{popify} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{popify} functionality.
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addPopover}}; \code{\link{addTooltip}};
+ \code{\link{bsPopover}}; \code{\link{bsTooltip}};
+ \code{\link{removePopover}}; \code{\link{removeTooltip}};
+ \code{\link{tipify}}
+}
+
diff --git a/man/removePopover.Rd b/man/removePopover.Rd
index 9d2eaa7..6cb805f 100644
--- a/man/removePopover.Rd
+++ b/man/removePopover.Rd
@@ -20,8 +20,8 @@ See \link{Tooltips_and_Popovers} for more information about how to use \code{rem
rest of the Tooltips_and_Popovers family.
}
\note{
-Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
-of removePopover functionality
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{removePopover} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
@@ -29,6 +29,7 @@ of removePopover functionality
Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
\code{\link{addPopover}}; \code{\link{addTooltip}};
\code{\link{bsPopover}}; \code{\link{bsTooltip}};
- \code{\link{removeTooltip}}
+ \code{\link{popify}}; \code{\link{removeTooltip}};
+ \code{\link{tipify}}
}
diff --git a/man/removeTooltip.Rd b/man/removeTooltip.Rd
index ae07e47..6f85807 100644
--- a/man/removeTooltip.Rd
+++ b/man/removeTooltip.Rd
@@ -20,8 +20,8 @@ See \link{Tooltips_and_Popovers} for more information about how to use \code{rem
rest of the Tooltips_and_Popovers family.
}
\note{
-Run \code{example("Tooltips_and_Popovers", "shinyBS", ask = FALSE)} for an example
-of removeTooltip functionality
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{removeTooltip} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
@@ -29,6 +29,7 @@ of removeTooltip functionality
Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
\code{\link{addPopover}}; \code{\link{addTooltip}};
\code{\link{bsPopover}}; \code{\link{bsTooltip}};
- \code{\link{removePopover}}
+ \code{\link{popify}}; \code{\link{removePopover}};
+ \code{\link{tipify}}
}
diff --git a/man/tipify.Rd b/man/tipify.Rd
new file mode 100644
index 0000000..e4f3dc2
--- /dev/null
+++ b/man/tipify.Rd
@@ -0,0 +1,44 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/tipify.R
+\name{tipify}
+\alias{tipify}
+\title{tipify}
+\usage{
+tipify(el, title, placement = "bottom", trigger = "hover", options = NULL)
+}
+\arguments{
+\item{el}{A shiny UI element.}
+
+\item{title}{The content of the tooltip.}
+
+\item{placement}{Where the tooltip should appear relative to its target
+(\code{top}, \code{bottom}, \code{left}, or \code{right}). Defaults to \code{"bottom"}.}
+
+\item{trigger}{What action should cause the tooltip to appear? (\code{hover},
+\code{focus}, \code{click}, or \code{manual}). Defaults to \code{"hover"}.}
+
+\item{options}{A named list of additional options to be set on the tooltip.}
+}
+\description{
+\code{tipify} can be wrapped around any shiny UI element to add a tooltip to the
+wrapped element. This should be a safer way to add tooltips to elements created with
+\code{\link{renderUI}}.
+}
+\details{
+See \link{Tooltips_and_Popovers} for more information about how to use \code{tipify} with the
+rest of the Tooltips_and_Popovers family.
+}
+\note{
+Run \code{bsExample("Tooltips_and_Popovers")} for an example
+of \code{tipify} functionality.
+}
+\seealso{
+\href{http://getbootstrap.com}{Twitter Bootstrap 3}
+
+Other Tooltips_and_Popovers: \code{\link{Tooltips_and_Popovers}};
+ \code{\link{addPopover}}; \code{\link{addTooltip}};
+ \code{\link{bsPopover}}; \code{\link{bsTooltip}};
+ \code{\link{popify}}; \code{\link{removePopover}};
+ \code{\link{removeTooltip}}
+}
+
diff --git a/man/toggleModal.Rd b/man/toggleModal.Rd
index b14a3f3..1af7454 100644
--- a/man/toggleModal.Rd
+++ b/man/toggleModal.Rd
@@ -22,8 +22,8 @@ See \link{Modals} for more information about how to use \code{toggleModal} with
rest of the Modals family.
}
\note{
-Run \code{example("Modals", "shinyBS", ask = FALSE)} for an example
-of toggleModal functionality
+Run \code{bsExample("Modals")} for an example
+of \code{toggleModal} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/updateButton.Rd b/man/updateButton.Rd
index 8579351..219637b 100644
--- a/man/updateButton.Rd
+++ b/man/updateButton.Rd
@@ -41,8 +41,8 @@ created by \code{\link{bsButton}} such as \code{\link{submitButton}}.
See \code{\link{Buttons}} for more information about how to use \code{updateButton} with the rest of the Buttons family.
}
\note{
-Run \code{example("Buttons", "shinyBS", ask = FALSE)} for an example
-of updateButton functionality
+Run \code{bsExample("Buttons")} for an example
+of \code{updateButton} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
diff --git a/man/updateCollapse.Rd b/man/updateCollapse.Rd
index 96ca783..42b717a 100644
--- a/man/updateCollapse.Rd
+++ b/man/updateCollapse.Rd
@@ -31,8 +31,8 @@ See \link{Collapses} for more information about how to use \code{updateCollapse}
rest of the Collapses family.
}
\note{
-Run \code{example("Collapses", "shinyBS", ask = FALSE)} for an example
-of updateCollapse functionality
+Run \code{bsExample("Collapses")} for an example
+of \code{updateCollapse} functionality.
}
\seealso{
\href{http://getbootstrap.com}{Twitter Bootstrap 3}
From cba5d9ba2d6216f3fece5a1bf27be571beef94d2 Mon Sep 17 00:00:00 2001
From: Eric
Date: Thu, 26 Mar 2015 08:23:35 -0400
Subject: [PATCH 77/89] changed examples again to try to get CRAN approval. Now
creating 'app' object and only wrapping 'runApp(app)' in \dontrun{}
---
DESCRIPTION | 4 ++--
R/Alerts.R | 7 +++++--
R/Buttons.R | 5 +++--
R/Collapses.R | 5 +++--
R/Modals.R | 5 +++--
R/Tooltips_and_Popovers.R | 6 ++++--
man/Alerts.Rd | 6 ++++--
man/Buttons.Rd | 5 +++--
man/Collapses.Rd | 5 +++--
man/Modals.Rd | 5 +++--
man/Tooltips_and_Popovers.Rd | 6 ++++--
11 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 39fdefa..7bd71c4 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: shinyBS
Type: Package
Title: Twitter Bootstrap Components for Shiny
-Version: 0.60
-Date: 2015-03-25
+Version: 0.61
+Date: 2015-03-26
Author: Eric Bailey
Maintainer: Eric Bailey
Description: Adds additional Twitter Bootstrap components to Shiny.
diff --git a/R/Alerts.R b/R/Alerts.R
index 6b5ad1a..95e3407 100644
--- a/R/Alerts.R
+++ b/R/Alerts.R
@@ -37,10 +37,10 @@
#'\code{content} was called \code{message} in previous versions of shinyBS.
#'
#'@examples
-#'\dontrun{
+#'
#'library(shiny)
#'library(shinyBS)
-#'shinyApp(
+#'app = shinyApp(
#' ui =
#' fluidPage(
#' sidebarLayout(
@@ -72,6 +72,9 @@
#' })
#' }
#')
+#'
+#'\dontrun{
+#' runApp(app)
#'}
#'@templateVar item_name Alerts
#'@templateVar family_name Alerts
diff --git a/R/Buttons.R b/R/Buttons.R
index 6a1061f..f391998 100644
--- a/R/Buttons.R
+++ b/R/Buttons.R
@@ -35,10 +35,9 @@
#'\code{icon} was added to allow placing an icon in the button.
#'
#'@examples
-#'\dontrun{
#'library(shiny)
#'library(shinyBS)
-#'shinyApp(
+#'app = shinyApp(
#' ui =
#' fluidPage(
#' sidebarLayout(
@@ -107,6 +106,8 @@
#' })
#' }
#')
+#'\dontrun{
+#' runApp(app)
#'}
#'@templateVar item_name Buttons
#'@templateVar family_name Buttons
diff --git a/R/Collapses.R b/R/Collapses.R
index d4bca16..1208b8e 100644
--- a/R/Collapses.R
+++ b/R/Collapses.R
@@ -28,11 +28,10 @@
#'shinyBS.
#'
#'@examples
-#'\dontrun{
#'library(shiny)
#'library(shinyBS)
#'
-#'shinyApp(
+#'app = shinyApp(
#' ui =
#' fluidPage(
#' sidebarLayout(
@@ -63,6 +62,8 @@
#' }))
#' }
#')
+#'\dontrun{
+#' runApp(app)
#'}
#'@templateVar item_name Collapses
#'@templateVar family_name Collapses
diff --git a/R/Modals.R b/R/Modals.R
index 2ecb733..0237a28 100644
--- a/R/Modals.R
+++ b/R/Modals.R
@@ -30,11 +30,10 @@
#'size of the modal window. Either \code{small} or \code{large}.
#'
#'@examples
-#'\dontrun{
#'library(shiny)
#'library(shinyBS)
#'
-#'shinyApp(
+#'app = shinyApp(
#' ui =
#' fluidPage(
#' sidebarLayout(
@@ -85,6 +84,8 @@
#'
#' }
#')
+#'\dontrun{
+#' runApp(app)
#'}
#'@templateVar family_name Modals
#'@templateVar item_name Modals
diff --git a/R/Tooltips_and_Popovers.R b/R/Tooltips_and_Popovers.R
index 97f9a32..0106331 100644
--- a/R/Tooltips_and_Popovers.R
+++ b/R/Tooltips_and_Popovers.R
@@ -56,10 +56,10 @@
#'details.
#'
#'@examples
-#'\dontrun{
#'library(shiny)
#'library(shinyBS)
-#'shinyApp(
+#'
+#'app = shinyApp(
#' ui =
#' fluidPage(
#' sidebarLayout(
@@ -106,6 +106,8 @@
#' "Applied Statistics 39, 357-365.
"), trigger = 'click')
#' }
#')
+#'\dontrun{
+#' runApp(app)
#'}
#'@templateVar item_name Tooltips_and_Popovers
#'@templateVar family_name Tooltips_and_Popovers
diff --git a/man/Alerts.Rd b/man/Alerts.Rd
index c2829df..9c6c1be 100644
--- a/man/Alerts.Rd
+++ b/man/Alerts.Rd
@@ -48,10 +48,9 @@ There are three functions in the Alerts family:
\code{content} was called \code{message} in previous versions of shinyBS.
}
\examples{
-\dontrun{
library(shiny)
library(shinyBS)
-shinyApp(
+app = shinyApp(
ui =
fluidPage(
sidebarLayout(
@@ -83,6 +82,9 @@ shinyApp(
})
}
)
+
+\dontrun{
+ runApp(app)
}
}
\seealso{
diff --git a/man/Buttons.Rd b/man/Buttons.Rd
index 8625323..d1c773a 100644
--- a/man/Buttons.Rd
+++ b/man/Buttons.Rd
@@ -46,10 +46,9 @@ There are two functions in the Buttons family:
\code{icon} was added to allow placing an icon in the button.
}
\examples{
-\dontrun{
library(shiny)
library(shinyBS)
-shinyApp(
+app = shinyApp(
ui =
fluidPage(
sidebarLayout(
@@ -118,6 +117,8 @@ shinyApp(
})
}
)
+\dontrun{
+ runApp(app)
}
}
\seealso{
diff --git a/man/Collapses.Rd b/man/Collapses.Rd
index 87d5959..c348f66 100644
--- a/man/Collapses.Rd
+++ b/man/Collapses.Rd
@@ -39,11 +39,10 @@ of \code{Collapses} functionality.
shinyBS.
}
\examples{
-\dontrun{
library(shiny)
library(shinyBS)
-shinyApp(
+app = shinyApp(
ui =
fluidPage(
sidebarLayout(
@@ -74,6 +73,8 @@ shinyApp(
}))
}
)
+\dontrun{
+ runApp(app)
}
}
\seealso{
diff --git a/man/Modals.Rd b/man/Modals.Rd
index e03c286..bcdda74 100644
--- a/man/Modals.Rd
+++ b/man/Modals.Rd
@@ -41,11 +41,10 @@ The \code{size} argument in \code{\link{bsModal}} allows you to specify the
size of the modal window. Either \code{small} or \code{large}.
}
\examples{
-\dontrun{
library(shiny)
library(shinyBS)
-shinyApp(
+app = shinyApp(
ui =
fluidPage(
sidebarLayout(
@@ -96,6 +95,8 @@ shinyApp(
}
)
+\dontrun{
+ runApp(app)
}
}
\seealso{
diff --git a/man/Tooltips_and_Popovers.Rd b/man/Tooltips_and_Popovers.Rd
index 10f9343..1520004 100644
--- a/man/Tooltips_and_Popovers.Rd
+++ b/man/Tooltips_and_Popovers.Rd
@@ -66,10 +66,10 @@ the \href{http://getbootstrap.com}{Twitter Bootstrap 3 documentation} for more
details.
}
\examples{
-\dontrun{
library(shiny)
library(shinyBS)
-shinyApp(
+
+app = shinyApp(
ui =
fluidPage(
sidebarLayout(
@@ -116,6 +116,8 @@ shinyApp(
"Applied Statistics 39, 357-365."), trigger = 'click')
}
)
+\dontrun{
+ runApp(app)
}
}
\seealso{
From d2d195b6af6047a90b082361ebf7b0015401515a Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 31 Mar 2015 13:10:40 -0400
Subject: [PATCH 78/89] Updated Date before resubmission to CRAN
---
DESCRIPTION | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 7bd71c4..9fcf7c6 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,7 +2,7 @@ Package: shinyBS
Type: Package
Title: Twitter Bootstrap Components for Shiny
Version: 0.61
-Date: 2015-03-26
+Date: 2015-03-30
Author: Eric Bailey
Maintainer: Eric Bailey
Description: Adds additional Twitter Bootstrap components to Shiny.
From fccf2c3bc544935b5f6ae924bfb65708fb58365c Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 31 Mar 2015 13:38:44 -0400
Subject: [PATCH 79/89] Update README.md
---
README.md | 43 ++++++++++++++++---------------------------
1 file changed, 16 insertions(+), 27 deletions(-)
diff --git a/README.md b/README.md
index 2d871ca..aaa6177 100644
--- a/README.md
+++ b/README.md
@@ -2,29 +2,19 @@ shinyBS
-------
**shinyBS** is a package that adds several additional Twitter Boostrap
-components to shiny. RStudio recently updated shiny to work with Bootstrap3
-which completely broke the original shinyBS. I am updating shinyBS to
-work with the newest versions of shiny but it is taking some time.
-
-Bootstrap has removed some components from version 3 (namely typeaheads
-and submenus in dropdowns). I originally intended to create work arounds
-to keep these features available in shinyBS, despite the fact that they
-were removed from Bootstrap. In the interest of avoiding "feature creep"
-I've decided that I am only going to restore those features that are
-present in the version of Bootstrap supported by Shiny. This will break
-backwards compatibility for some, and I apologize for this.
-
-Concentrating on getting Bootstrap's core functionality incorporated into
-the newest version of shinyBS will allow me to get a working version back
-on CRAN as quickly as possible. After that is done, I will look at either
-reincorporating the lost functionality back into shinyBS or creating new
-packages that give users access to this functionality.
-
-I have most of the functionality that I intend to release with shinyBS 0.50
-working now and am now working primarily on testing and documentation. I hope
-to have the new version on CRAN in the first half of March 2015.
-
-Features that will remain in version 0.5 include:
+components to shiny. In January RStudio updated shiny to work with Bootstrap3
+which completely broke the original shinyBS. I have updated shinyBS to
+work with the newest versions of shiny.
+
+After several rounds of revisions, shinyBS v0.61 was accepted by CRAN on March 31st, 2015 and is available for install with `install.packages()`
+
+```R
+install.packages("shinyBS")
+```
+
+Not all functionality that was in the previous versions was kept in this new version. Partly because of time constraints and partly because of some functionality being removed from Bootstrap.
+
+Features that remain in shinyBS 0.61 include:
* Alerts
* Tooltips
@@ -33,13 +23,12 @@ Features that will remain in version 0.5 include:
* Collapse Panels
* Button upgrades
-Features that will not be included in version 0.5 include:
+Features that are not included in shinyBS 0.61 include:
* Navbars and related components
* Typeaheads
* Progress Bars
* Button Groups
+* Table Formatting
-Sorry for any inconvenience,
-
-Eric
+Now that this version has been been accepted by CRAN I will start working on updates and added functionality. If you have a request please open an issue and let me know. Thanks!
From f2e2fc85cb2b85a7cc365830417ebb5c69b6934a Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 31 Mar 2015 14:09:22 -0400
Subject: [PATCH 80/89] Working to integrate ThomasSiegmund's shinyTypeahead
package to return typeahead functionality.
---
DESCRIPTION | 4 +-
NAMESPACE | 2 +
R/bsTypeahead.R | 41 +++
R/misc.R | 1 +
R/updateTypeahead.R | 23 ++
inst/www/bootstrap3-typeahead.js | 476 +++++++++++++++++++++++++++++
inst/www/typeahead_inputbinding.js | 69 +++++
man/bsTypeahead.Rd | 32 ++
man/updateTypeahead.Rd | 28 ++
9 files changed, 674 insertions(+), 2 deletions(-)
create mode 100644 R/bsTypeahead.R
create mode 100644 R/updateTypeahead.R
create mode 100644 inst/www/bootstrap3-typeahead.js
create mode 100644 inst/www/typeahead_inputbinding.js
create mode 100644 man/bsTypeahead.Rd
create mode 100644 man/updateTypeahead.Rd
diff --git a/DESCRIPTION b/DESCRIPTION
index 9fcf7c6..27744fd 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: shinyBS
Type: Package
Title: Twitter Bootstrap Components for Shiny
-Version: 0.61
-Date: 2015-03-30
+Version: 0.62
+Date: 2015-03-31
Author: Eric Bailey
Maintainer: Eric Bailey
Description: Adds additional Twitter Bootstrap components to Shiny.
diff --git a/NAMESPACE b/NAMESPACE
index 500df17..f3c7843 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -10,6 +10,7 @@ export(bsExample)
export(bsModal)
export(bsPopover)
export(bsTooltip)
+export(bsTypeahead)
export(closeAlert)
export(createAlert)
export(popify)
@@ -19,3 +20,4 @@ export(tipify)
export(toggleModal)
export(updateButton)
export(updateCollapse)
+export(updateTypeahead)
diff --git a/R/bsTypeahead.R b/R/bsTypeahead.R
new file mode 100644
index 0000000..bd05652
--- /dev/null
+++ b/R/bsTypeahead.R
@@ -0,0 +1,41 @@
+#'bsTypeahead
+#'
+#'\code{typeaheadInput} creates a textinput with type ahead function buttons.
+#'
+#'@param inputId Input variable to assign the control's value to
+#'@param label Display label for the control
+#'@param value Initial value
+#'@param choices Array of strings to match against. Can also be JavaScript
+#' function. Use htmlwidgets::JS() to indicate JavaScript. The length of \code{choices} must no exceed 131370.
+#'@param items The max number of items to display in the dropdown. Can also be
+#' set to 'all'
+#'@param minLength The minimum character length needed before triggering
+#' autocomplete suggestions. You can set it to 0 so suggestion are shown even
+#' when there is no text when lookup function is called.
+#'@seealso \code{\link{updateTypeaheadInput}}
+#'@export
+bsTypeahead <- function(inputId, label, value = "", choices, items = 8, minLength = 1) {
+ if(!is.null(choices)) {
+ if(length(choices) > 131370) {
+ warning("Due to a limitation of the Bootstrap2 Typeahead JavaScript library the length of 'choices' must not exceed 2 ^ 17 - 2!");
+ }
+ }
+ if(!'JS_EVAL' %in% class(choices)) {
+ choices <- jsonlite::toJSON(choices);
+ }
+ typeahead <- shiny::tagList(
+ shiny::div(class = 'form-group shiny-input-container',
+ shiny::tags$label(label, `for` = inputId),
+ shiny::tags$input(id = inputId, type="text",
+ class="form-control shiny-bound-input typeahead",
+ "data-provide" = "typeahead", autocomplete="off",
+ value = value),
+ shiny::tags$script(paste0("$('#", inputId, "').typeahead({source: ", choices, ",
+ items: ", items, ",
+ minLength: ", minLength, "})"))
+ )
+ )
+
+ htmltools::attachDependencies(typeahead, typeaheadDep)
+
+}
\ No newline at end of file
diff --git a/R/misc.R b/R/misc.R
index aa4dde3..63c4719 100644
--- a/R/misc.R
+++ b/R/misc.R
@@ -6,6 +6,7 @@
}
shinyBSDep <- htmltools::htmlDependency("shinyBS", packageVersion("shinyBS"), src = c("href" = "sbs"), script = "shinyBS.js", stylesheet = "shinyBS.css")
+typeaheadDep <- htmltools::htmlDependency("shinyBS", packageVersion("shinyBS"), src = c("href" = "sbs"), script = c("bootstrap3-typeahead.js", "typeahead_inputbinding.js"));
# Copy of dropNulls function for shiny to avoid using shiny:::dropNulls
dropNulls <- function(x) {
diff --git a/R/updateTypeahead.R b/R/updateTypeahead.R
new file mode 100644
index 0000000..8acadba
--- /dev/null
+++ b/R/updateTypeahead.R
@@ -0,0 +1,23 @@
+#'updateTypeahead
+#'
+#'\code{updateTypeahead} Update a typeaheadInput buttons.
+#'@param session The session object passed to function given to shinyServer.
+#'@param inputId Input variable to assign the control's value to
+#'@param label Display label for the control
+#'@param value Initial value
+#'@param choices Array of strings to match against. Can also be JavaScript
+#' function. Use htmlwidgets::JS() to indicate JavaScript.
+#'@seealso \code{\link{typeaheadInput}}
+#'@export
+updateTypeahead<- function(session, inputId, label=NULL, value=NULL, choices=NULL) {
+
+ if(!is.null(choices)) {
+ if(length(choices) > 131370) {
+ warning("Due to a limitation of the Bootstrap2 Typeahead JavaScript library the length of 'choices' must not exceed 2 ^ 17 - 2!");
+ }
+ }
+
+ data <- dropNulls(list(id = inputId, label=label, value=value, choices=choices))
+ session$sendCustomMessage("typeaheadUpdate", data)
+
+}
diff --git a/inst/www/bootstrap3-typeahead.js b/inst/www/bootstrap3-typeahead.js
new file mode 100644
index 0000000..d824f6d
--- /dev/null
+++ b/inst/www/bootstrap3-typeahead.js
@@ -0,0 +1,476 @@
+/* =============================================================
+ * bootstrap3-typeahead.js v3.1.0
+ * https://github.com/bassjobsen/Bootstrap-3-Typeahead
+ * =============================================================
+ * Original written by @mdo and @fat
+ * =============================================================
+ * Copyright 2014 Bass Jobsen @bassjobsen
+ *
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+(function (root, factory) {
+
+ 'use strict';
+
+ // CommonJS module is defined
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = factory(require('jquery'));
+ }
+ // AMD module is defined
+ else if (typeof define === 'function' && define.amd) {
+ define(['jquery'], function ($) {
+ return factory ($);
+ });
+ } else {
+ factory(root.jQuery);
+ }
+
+}(this, function ($) {
+
+ 'use strict';
+ // jshint laxcomma: true
+
+
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+ * ================================= */
+
+ var Typeahead = function (element, options) {
+ this.$element = $(element);
+ this.options = $.extend({}, $.fn.typeahead.defaults, options);
+ this.matcher = this.options.matcher || this.matcher;
+ this.sorter = this.options.sorter || this.sorter;
+ this.select = this.options.select || this.select;
+ this.autoSelect = typeof this.options.autoSelect == 'boolean' ? this.options.autoSelect : true;
+ this.highlighter = this.options.highlighter || this.highlighter;
+ this.render = this.options.render || this.render;
+ this.updater = this.options.updater || this.updater;
+ this.displayText = this.options.displayText || this.displayText;
+ this.source = this.options.source;
+ this.delay = this.options.delay;
+ this.$menu = $(this.options.menu);
+ this.$appendTo = this.options.appendTo ? $(this.options.appendTo) : null;
+ this.shown = false;
+ this.listen();
+ this.showHintOnFocus = typeof this.options.showHintOnFocus == 'boolean' ? this.options.showHintOnFocus : false;
+ this.afterSelect = this.options.afterSelect;
+ this.addItem = false;
+ };
+
+ Typeahead.prototype = {
+
+ constructor: Typeahead,
+
+ select: function () {
+ var val = this.$menu.find('.active').data('value');
+ this.$element.data('active', val);
+ if(this.autoSelect || val) {
+ var newVal = this.updater(val);
+ this.$element
+ .val(this.displayText(newVal) || newVal)
+ .change();
+ this.afterSelect(newVal);
+ }
+ return this.hide();
+ },
+
+ updater: function (item) {
+ return item;
+ },
+
+ setSource: function (source) {
+ this.source = source;
+ },
+
+ show: function () {
+ var pos = $.extend({}, this.$element.position(), {
+ height: this.$element[0].offsetHeight
+ }), scrollHeight;
+
+ scrollHeight = typeof this.options.scrollHeight == 'function' ?
+ this.options.scrollHeight.call() :
+ this.options.scrollHeight;
+
+ (this.$appendTo ? this.$menu.appendTo(this.$appendTo) : this.$menu.insertAfter(this.$element))
+ .css({
+ top: pos.top + pos.height + scrollHeight
+ , left: pos.left
+ })
+ .show();
+
+ this.shown = true;
+ return this;
+ },
+
+ hide: function () {
+ this.$menu.hide();
+ this.shown = false;
+ return this;
+ },
+
+ lookup: function (query) {
+ var items;
+ if (typeof(query) != 'undefined' && query !== null) {
+ this.query = query;
+ } else {
+ this.query = this.$element.val() || '';
+ }
+
+ if (this.query.length < this.options.minLength) {
+ return this.shown ? this.hide() : this;
+ }
+
+ var worker = $.proxy(function() {
+
+ if($.isFunction(this.source)) this.source(this.query, $.proxy(this.process, this));
+ else if (this.source) {
+ this.process(this.source);
+ }
+ }, this);
+
+ clearTimeout(this.lookupWorker);
+ this.lookupWorker = setTimeout(worker, this.delay);
+ },
+
+ process: function (items) {
+ var that = this;
+
+ items = $.grep(items, function (item) {
+ return that.matcher(item);
+ });
+
+ items = this.sorter(items);
+
+ if (!items.length && !this.options.addItem) {
+ return this.shown ? this.hide() : this;
+ }
+
+ if (items.length > 0) {
+ this.$element.data('active', items[0]);
+ } else {
+ this.$element.data('active', null);
+ }
+
+ // Add item
+ if (this.options.addItem){
+ items.push(this.options.addItem);
+ }
+
+ if (this.options.items == 'all') {
+ return this.render(items).show();
+ } else {
+ return this.render(items.slice(0, this.options.items)).show();
+ }
+ },
+
+ matcher: function (item) {
+ var it = this.displayText(item);
+ return ~it.toLowerCase().indexOf(this.query.toLowerCase());
+ },
+
+ sorter: function (items) {
+ var beginswith = []
+ , caseSensitive = []
+ , caseInsensitive = []
+ , item;
+
+ while ((item = items.shift())) {
+ var it = this.displayText(item);
+ if (!it.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item);
+ else if (~it.indexOf(this.query)) caseSensitive.push(item);
+ else caseInsensitive.push(item);
+ }
+
+ return beginswith.concat(caseSensitive, caseInsensitive);
+ },
+
+ highlighter: function (item) {
+ var html = $('');
+ var query = this.query;
+ var i = item.toLowerCase().indexOf(query.toLowerCase());
+ var len, leftPart, middlePart, rightPart, strong;
+ len = query.length;
+ if(len === 0){
+ return html.text(item).html();
+ }
+ while (i > -1) {
+ leftPart = item.substr(0, i);
+ middlePart = item.substr(i, len);
+ rightPart = item.substr(i + len);
+ strong = $('').text(middlePart);
+ html
+ .append(document.createTextNode(leftPart))
+ .append(strong);
+ item = rightPart;
+ i = item.toLowerCase().indexOf(query.toLowerCase());
+ }
+ return html.append(document.createTextNode(item)).html();
+ },
+
+ render: function (items) {
+ var that = this;
+ var self = this;
+ var activeFound = false;
+ items = $(items).map(function (i, item) {
+ var text = self.displayText(item);
+ i = $(that.options.item).data('value', item);
+ i.find('a').html(that.highlighter(text));
+ if (text == self.$element.val()) {
+ i.addClass('active');
+ self.$element.data('active', item);
+ activeFound = true;
+ }
+ return i[0];
+ });
+
+ if (this.autoSelect && !activeFound) {
+ items.first().addClass('active');
+ this.$element.data('active', items.first().data('value'));
+ }
+ this.$menu.html(items);
+ return this;
+ },
+
+ displayText: function(item) {
+ return item.name || item;
+ },
+
+ next: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , next = active.next();
+
+ if (!next.length) {
+ next = $(this.$menu.find('li')[0]);
+ }
+
+ next.addClass('active');
+ },
+
+ prev: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , prev = active.prev();
+
+ if (!prev.length) {
+ prev = this.$menu.find('li').last();
+ }
+
+ prev.addClass('active');
+ },
+
+ listen: function () {
+ this.$element
+ .on('focus', $.proxy(this.focus, this))
+ .on('blur', $.proxy(this.blur, this))
+ .on('keypress', $.proxy(this.keypress, this))
+ .on('keyup', $.proxy(this.keyup, this));
+
+ if (this.eventSupported('keydown')) {
+ this.$element.on('keydown', $.proxy(this.keydown, this));
+ }
+
+ this.$menu
+ .on('click', $.proxy(this.click, this))
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+ .on('mouseleave', 'li', $.proxy(this.mouseleave, this));
+ },
+
+ destroy : function () {
+ this.$element.data('typeahead',null);
+ this.$element.data('active',null);
+ this.$element
+ .off('focus')
+ .off('blur')
+ .off('keypress')
+ .off('keyup');
+
+ if (this.eventSupported('keydown')) {
+ this.$element.off('keydown');
+ }
+
+ this.$menu.remove();
+ },
+
+ eventSupported: function(eventName) {
+ var isSupported = eventName in this.$element;
+ if (!isSupported) {
+ this.$element.setAttribute(eventName, 'return;');
+ isSupported = typeof this.$element[eventName] === 'function';
+ }
+ return isSupported;
+ },
+
+ move: function (e) {
+ if (!this.shown) return;
+
+ switch(e.keyCode) {
+ case 9: // tab
+ case 13: // enter
+ case 27: // escape
+ e.preventDefault();
+ break;
+
+ case 38: // up arrow
+ // with the shiftKey (this is actually the left parenthesis)
+ if (e.shiftKey) return;
+ e.preventDefault();
+ this.prev();
+ break;
+
+ case 40: // down arrow
+ // with the shiftKey (this is actually the right parenthesis)
+ if (e.shiftKey) return;
+ e.preventDefault();
+ this.next();
+ break;
+ }
+
+ e.stopPropagation();
+ },
+
+ keydown: function (e) {
+ this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27]);
+ if (!this.shown && e.keyCode == 40) {
+ this.lookup();
+ } else {
+ this.move(e);
+ }
+ },
+
+ keypress: function (e) {
+ if (this.suppressKeyPressRepeat) return;
+ this.move(e);
+ },
+
+ keyup: function (e) {
+ switch(e.keyCode) {
+ case 40: // down arrow
+ case 38: // up arrow
+ case 16: // shift
+ case 17: // ctrl
+ case 18: // alt
+ break;
+
+ case 9: // tab
+ case 13: // enter
+ if (!this.shown) return;
+ this.select();
+ break;
+
+ case 27: // escape
+ if (!this.shown) return;
+ this.hide();
+ break;
+ default:
+ this.lookup();
+ }
+
+ e.stopPropagation();
+ e.preventDefault();
+ },
+
+ focus: function (e) {
+ if (!this.focused) {
+ this.focused = true;
+ if (this.options.showHintOnFocus) {
+ this.lookup('');
+ }
+ }
+ },
+
+ blur: function (e) {
+ this.focused = false;
+ if (!this.mousedover && this.shown) this.hide();
+ },
+
+ click: function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+ this.select();
+ this.$element.focus();
+ },
+
+ mouseenter: function (e) {
+ this.mousedover = true;
+ this.$menu.find('.active').removeClass('active');
+ $(e.currentTarget).addClass('active');
+ },
+
+ mouseleave: function (e) {
+ this.mousedover = false;
+ if (!this.focused && this.shown) this.hide();
+ }
+
+ };
+
+
+ /* TYPEAHEAD PLUGIN DEFINITION
+ * =========================== */
+
+ var old = $.fn.typeahead;
+
+ $.fn.typeahead = function (option) {
+ var arg = arguments;
+ if (typeof option == 'string' && option == 'getActive') {
+ return this.data('active');
+ }
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('typeahead')
+ , options = typeof option == 'object' && option;
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)));
+ if (typeof option == 'string') {
+ if (arg.length > 1) {
+ data[option].apply(data, Array.prototype.slice.call(arg ,1));
+ } else {
+ data[option]();
+ }
+ }
+ });
+ };
+
+ $.fn.typeahead.defaults = {
+ source: []
+ , items: 8
+ , menu: ''
+ , item: ' '
+ , minLength: 1
+ , scrollHeight: 0
+ , autoSelect: true
+ , afterSelect: $.noop
+ , addItem: false
+ , delay: 0
+ };
+
+ $.fn.typeahead.Constructor = Typeahead;
+
+
+ /* TYPEAHEAD NO CONFLICT
+ * =================== */
+
+ $.fn.typeahead.noConflict = function () {
+ $.fn.typeahead = old;
+ return this;
+ };
+
+
+ /* TYPEAHEAD DATA-API
+ * ================== */
+
+ $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+ var $this = $(this);
+ if ($this.data('typeahead')) return;
+ $this.typeahead($this.data());
+ });
+
+}));
diff --git a/inst/www/typeahead_inputbinding.js b/inst/www/typeahead_inputbinding.js
new file mode 100644
index 0000000..042bb05
--- /dev/null
+++ b/inst/www/typeahead_inputbinding.js
@@ -0,0 +1,69 @@
+//Creates input binding for TypeAhead Objects
+var typeAheadBinding = new Shiny.InputBinding();
+$.extend(typeAheadBinding, {
+ find: function(scope) {
+ return $(scope).find('.typeahead');
+ },
+ getId: function(el) {
+ return Shiny.InputBinding.prototype.getId.call(this, el) || el.name;
+ },
+ getValue: function(el) {
+ return el.value;
+ },
+ setValue: function(el, value) {
+ el.value = value;
+ },
+ initialize: function(el) {
+ $(el).typeahead();
+ },
+ subscribe: function(el, callback) {
+ $(el).on('keyup.typeAheadBinding input.typeAheadBinding', function(event) {
+ callback(true);
+ });
+ $(el).on('change.typeAheadBinding', function(event) {
+ callback(false);
+ });
+ },
+ unsubscribe: function(el) {
+ $(el).off('.typeAheadBinding');
+ },
+ receiveMessage: function(el, data) {
+ if (data.hasOwnProperty('value')) {
+ this.setValue(el, data.value);
+ };
+ if (data.hasOwnProperty('label')) {
+ $(el).parent().find('label[for=' + el.id + ']').text(data.label);
+ };
+ if (data.hasOwnProperty('choices')) {
+ $(el).data('typeahead').source = data.choices;
+ };
+ $(el).trigger('change');
+ },
+ getState: function(el) {
+ return {
+ label: $(el).parent().find('label[for=' + el.id + ']').text(),
+ value: el.value
+ };
+ },
+ getRatePolicy: function() {
+ return {
+ policy: 'debounce',
+ delay: 250
+ };
+ }
+});
+Shiny.inputBindings.register(typeAheadBinding);
+
+Shiny.addCustomMessageHandler("typeaheadUpdate", function(data) {
+ var typeahead = $("input#" + data.id);
+ if (data.hasOwnProperty('value')) {
+ typeahead[0].value = data.value;
+ };
+ if (data.hasOwnProperty('label')) {
+ typeahead.parent().find('label[for=' + data.id + ']').text(data.label);
+ };
+ if (data.hasOwnProperty('choices')) {
+ typeahead.data('typeahead').source = data.choices;
+ };
+ typeahead.trigger('change');
+})
\ No newline at end of file
diff --git a/man/bsTypeahead.Rd b/man/bsTypeahead.Rd
new file mode 100644
index 0000000..baf5243
--- /dev/null
+++ b/man/bsTypeahead.Rd
@@ -0,0 +1,32 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/bsTypeahead.R
+\name{bsTypeahead}
+\alias{bsTypeahead}
+\title{bsTypeahead}
+\usage{
+bsTypeahead(inputId, label, value = "", choices, items = 8, minLength = 1)
+}
+\arguments{
+\item{inputId}{Input variable to assign the control's value to}
+
+\item{label}{Display label for the control}
+
+\item{value}{Initial value}
+
+\item{choices}{Array of strings to match against. Can also be JavaScript
+function. Use htmlwidgets::JS() to indicate JavaScript. The length of \code{choices} must no exceed 131370.}
+
+\item{items}{The max number of items to display in the dropdown. Can also be
+set to 'all'}
+
+\item{minLength}{The minimum character length needed before triggering
+autocomplete suggestions. You can set it to 0 so suggestion are shown even
+when there is no text when lookup function is called.}
+}
+\description{
+\code{typeaheadInput} creates a textinput with type ahead function buttons.
+}
+\seealso{
+\code{\link{updateTypeaheadInput}}
+}
+
diff --git a/man/updateTypeahead.Rd b/man/updateTypeahead.Rd
new file mode 100644
index 0000000..3084f05
--- /dev/null
+++ b/man/updateTypeahead.Rd
@@ -0,0 +1,28 @@
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/updateTypeahead.R
+\name{updateTypeahead}
+\alias{updateTypeahead}
+\title{updateTypeahead}
+\usage{
+updateTypeahead(session, inputId, label = NULL, value = NULL,
+ choices = NULL)
+}
+\arguments{
+\item{session}{The session object passed to function given to shinyServer.}
+
+\item{inputId}{Input variable to assign the control's value to}
+
+\item{label}{Display label for the control}
+
+\item{value}{Initial value}
+
+\item{choices}{Array of strings to match against. Can also be JavaScript
+function. Use htmlwidgets::JS() to indicate JavaScript.}
+}
+\description{
+\code{updateTypeahead} Update a typeaheadInput buttons.
+}
+\seealso{
+\code{\link{typeaheadInput}}
+}
+
From 557b56a678302962f60d2ebb5c337993242a7d15 Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 14 Apr 2015 12:52:35 -0400
Subject: [PATCH 81/89] Added footer and close.button arguments to bsModal
(Issue #25)
---
R/bsModal.R | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/R/bsModal.R b/R/bsModal.R
index b2f9f4f..f073422 100644
--- a/R/bsModal.R
+++ b/R/bsModal.R
@@ -12,7 +12,7 @@
#'@template item_details
#'@template footer
#'@export
-bsModal <- function(id, title, trigger, ..., size) {
+bsModal <- function(id, title, trigger, ..., size, footer = NULL, close.button = TRUE) {
if(!missing(size)) {
if(size == "large") {
size = "modal-lg"
@@ -23,6 +23,15 @@ bsModal <- function(id, title, trigger, ..., size) {
} else {
size <- "modal-dialog"
}
+
+ if(is.null(footer)) {
+ footer <- tagList()
+ }
+
+ if(close.button) {
+ footer <- shiny::tagAppendChild(footer, tagList(shiny::tags$button(type = "button", class = "btn btn-default", "data-dismiss" = "modal", "Close")))
+ }
+
bsTag <- shiny::tags$div(class = "modal sbs-modal fade", id = id, tabindex = "-1", "data-sbs-trigger" = trigger,
shiny::tags$div(class = size,
shiny::tags$div(class = "modal-content",
@@ -32,7 +41,7 @@ bsModal <- function(id, title, trigger, ..., size) {
),
shiny::tags$div(class = "modal-body", list(...)),
shiny::tags$div(class = "modal-footer",
- shiny::tags$button(type = "button", class = "btn btn-default", "data-dismiss" = "modal", "Close")
+ footer
)
)
)
From bf58f4e48ab066033a78d9b3d595032fc85d392c Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 15 Apr 2015 07:38:04 -0400
Subject: [PATCH 82/89] Added experimental width argument to bsModal (Issue
#27)
---
R/bsModal.R | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/R/bsModal.R b/R/bsModal.R
index f073422..e409ea3 100644
--- a/R/bsModal.R
+++ b/R/bsModal.R
@@ -12,7 +12,7 @@
#'@template item_details
#'@template footer
#'@export
-bsModal <- function(id, title, trigger, ..., size, footer = NULL, close.button = TRUE) {
+bsModal <- function(id, title, trigger, ..., size, footer = NULL, close.button = TRUE, width = NULL) {
if(!missing(size)) {
if(size == "large") {
size = "modal-lg"
@@ -20,6 +20,7 @@ bsModal <- function(id, title, trigger, ..., size, footer = NULL, close.button =
size = "modal-sm"
}
size <- paste("modal-dialog", size)
+ width = NULL
} else {
size <- "modal-dialog"
}
@@ -32,19 +33,25 @@ bsModal <- function(id, title, trigger, ..., size, footer = NULL, close.button =
footer <- shiny::tagAppendChild(footer, tagList(shiny::tags$button(type = "button", class = "btn btn-default", "data-dismiss" = "modal", "Close")))
}
+ bsTag <- shiny::tags$div(class = size,
+ shiny::tags$div(class = "modal-content",
+ shiny::tags$div(class = "modal-header",
+ shiny::tags$button(type = "button", class = "close", "data-dismiss" = "modal", shiny::tags$span(shiny::HTML("×"))),
+ shiny::tags$h4(class = "modal-title", title)
+ ),
+ shiny::tags$div(class = "modal-body", list(...)),
+ shiny::tags$div(class = "modal-footer",
+ footer
+ )
+ )
+ )
+
+ if(!is.null(width)) {
+ bsTag <- addAttribs(bsTag, style = paste0("width: ", width, " !important;"))
+ }
+
bsTag <- shiny::tags$div(class = "modal sbs-modal fade", id = id, tabindex = "-1", "data-sbs-trigger" = trigger,
- shiny::tags$div(class = size,
- shiny::tags$div(class = "modal-content",
- shiny::tags$div(class = "modal-header",
- shiny::tags$button(type = "button", class = "close", "data-dismiss" = "modal", shiny::tags$span(shiny::HTML("×"))),
- shiny::tags$h4(class = "modal-title", title)
- ),
- shiny::tags$div(class = "modal-body", list(...)),
- shiny::tags$div(class = "modal-footer",
- footer
- )
- )
- )
+ bsTag
)
htmltools::attachDependencies(bsTag, shinyBSDep)
From 02b318af25eea43080d4f3b6c501b3e5f10850f7 Mon Sep 17 00:00:00 2001
From: Eric
Date: Wed, 15 Apr 2015 08:07:19 -0400
Subject: [PATCH 83/89] updated documentation with modal upgrades.
---
R/bsModal.R | 3 +++
1 file changed, 3 insertions(+)
diff --git a/R/bsModal.R b/R/bsModal.R
index e409ea3..38d638f 100644
--- a/R/bsModal.R
+++ b/R/bsModal.R
@@ -7,6 +7,9 @@
#'@param trigger The id of a button or link that will open the modal.
#'@param \dots UI elements to include within the modal
#'@param size \bold{Optional} What size should the modal be? (\code{small} or \code{large})
+#'@param footer A \code{list} of shiny UI elements to be added to the footer of the modal.
+#'@param close.button Should a close button be added to the footer of the modal?
+#'@param width An optional width argument for the modal. Must include units. Only applied if \code{size} is missing.
#'@templateVar item_name bsModal
#'@templateVar family_name Modals
#'@template item_details
From 67ba9a262115aba974f2f0ab0d11095aee839b53 Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 28 Apr 2015 15:02:52 -0400
Subject: [PATCH 84/89] Escaped single quotes to fix issue #30
---
R/Tooltips_and_Popovers.R | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/R/Tooltips_and_Popovers.R b/R/Tooltips_and_Popovers.R
index 0106331..bce5ccf 100644
--- a/R/Tooltips_and_Popovers.R
+++ b/R/Tooltips_and_Popovers.R
@@ -141,9 +141,10 @@ buildTooltipOrPopoverOptionsList <- function(title, placement, trigger, options,
}
if(!missing(content)) {
+ content <- gsub("'", "'", content, fixed = TRUE)
if(is.null(options$content)) {
options$content = shiny::HTML(content)
- }
+ }
}
if(is.null(options$placement)) {
@@ -157,6 +158,7 @@ buildTooltipOrPopoverOptionsList <- function(title, placement, trigger, options,
if(is.null(options$title)) {
options$title = title
+ options$title <- gsub("'", "'", options$title, fixed = TRUE)
}
return(options)
From 21fdccbe3ba2d9cdcdbadfc12c99858aac99b43e Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 17 May 2016 06:06:46 -0400
Subject: [PATCH 85/89] Changed how popover and tooltips are assigned to an
element on the page
---
inst/www/shinyBS.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/inst/www/shinyBS.js b/inst/www/shinyBS.js
index 4833fa2..cd65e90 100644
--- a/inst/www/shinyBS.js
+++ b/inst/www/shinyBS.js
@@ -223,13 +223,15 @@ shinyBS.removeTooltip = function(id, type) {
// shiny inputs/outputs
shinyBS.getTooltipTarget = function(id) {
- var $id = $("#" + id);
+ var $id = $("#" + id).closest(".shiny-input-container, .shiny-bound-output, .btn, .shiny-download-link");
+/*
if($id.hasClass("js-range-slider")) {
$id = $id.parent();
} else if($id.hasClass("selectized")) {
$id = $id.siblings("div.selectize-control")
}
+*/
return $id;
From 617bcaf020863cb7606719a1cfc250b9c3ff48da Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 17 May 2016 06:07:19 -0400
Subject: [PATCH 86/89] added more tag manipulators for class and style
---
R/misc.R | 17 --------
R/tagManipulators.R | 96 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 96 insertions(+), 17 deletions(-)
create mode 100644 R/tagManipulators.R
diff --git a/R/misc.R b/R/misc.R
index 63c4719..3238633 100644
--- a/R/misc.R
+++ b/R/misc.R
@@ -13,23 +13,6 @@ dropNulls <- function(x) {
x[!vapply(x, is.null, FUN.VALUE = logical(1))]
}
-# Takes a tag and removes any classes in the remove argument
-removeClass <- function(tag, remove) {
-
- if(length(remove) == 1) remove <- strsplit(remove, " ", fixed = TRUE)[[1]]
- class <- strsplit(tag$attribs$class, " ", fixed = TRUE)[[1]]
- class <- class[!(class %in% remove)]
- tag$attribs$class <- paste(class, collapse = " ")
-
- return(tag)
-
-}
-
-addClass <- function(tag, add) {
- tag$attribs$class <- paste(tag$attribs$class, add)
- return(tag)
-}
-
addAttribs <- function(tag, ...) {
a <- list(...)
for(i in seq(length(a))) {
diff --git a/R/tagManipulators.R b/R/tagManipulators.R
new file mode 100644
index 0000000..a2ad0fe
--- /dev/null
+++ b/R/tagManipulators.R
@@ -0,0 +1,96 @@
+addClass <- function(tag, class) {
+
+ if(!is.null(class)) {
+ tag$attribs$class <- trimws(paste(tag$attribs$class, class), "both")
+ }
+
+ tag
+
+}
+
+removeClass <- function(tag, class) {
+
+ if(!is.null(class) & !is.null(tag$attribs$class)) {
+ cls <- strsplit(tag$attribs$class, " ")[[1]]
+ cls <- cls[cls != class]
+ tag$attribs$class <- paste(cls, collapse = " ")
+ }
+
+ tag
+
+}
+
+hasClass <- function(tag, class) {
+ if(!is.null(class) & !is.null(tag$attribs$class)) {
+ class %in% strsplit(tag$attribs$class, " ")[[1]]
+ } else {
+ FALSE
+ }
+}
+
+checkClass <- function(class, include) {
+ if(!include) class <- NULL
+ class
+}
+
+buildClass <- function(prefix, variable) {
+ if(!is.null(variable)) {
+ variable <- paste0(prefix, variable)
+ }
+ variable
+}
+
+addStyles <- function(tag, ..., .dots) {
+
+ new_styles <- list(...)
+
+ if(!missing(.dots)) {
+ new_styles <- c(new_styles, .dots)
+ }
+
+ if(!is.null(tag$attribs$style)) {
+ styles <- parseStyles(tag$attribs$style)
+ } else {
+ styles <- list()
+ }
+
+ for(i in seq_along(new_styles)) {
+ styles[[names(new_styles)[i]]] <- new_styles[[i]]
+ }
+
+ tag$attribs$style <- writeStyles(styles)
+
+ tag
+
+}
+
+removeStyles <- function(tag, ...) {
+
+ if(!is.null(tag$attribs$style)) {
+ styleList <- list(...)
+ styles <- parseStyles(tag$attribs$style)
+ styles <- styles[!names(styles) %in% styleList]
+ tag$attribs$style <- writeStyles(styles)
+ }
+
+ tag
+
+}
+
+parseStyles <- function(styleString) {
+
+ styles <- trimws(strsplit(styleString, ";")[[1]])
+ styles <- strsplit(styles, ":")
+ style_names <- sapply(styles, function(s) trimws(s[1]))
+ styles <- lapply(styles, function(s) trimws(s[2]))
+ names(styles) <- style_names
+
+ return(styles)
+
+}
+
+writeStyles <- function(styleList) {
+
+ paste(names(styleList), styleList, sep = ": ", collapse = "; ")
+
+}
From 9e48fbd1586544b31124ee8d3ca0f2eaea915675 Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 17 May 2016 06:07:45 -0400
Subject: [PATCH 87/89] testing new popover/tooltip function
---
inst/examples/TooltipsandPopovers/server.R | 3 +++
inst/examples/TooltipsandPopovers/ui.R | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/inst/examples/TooltipsandPopovers/server.R b/inst/examples/TooltipsandPopovers/server.R
index 30ee3c4..d7de9e2 100644
--- a/inst/examples/TooltipsandPopovers/server.R
+++ b/inst/examples/TooltipsandPopovers/server.R
@@ -12,6 +12,9 @@ shinyServer(
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
+ output$dataTable <- renderDataTable({
+ faithful
+ })
output$uiExample <- renderUI({
tags$span(
popify(bsButton("pointlessButton", "Button", style = "primary", size = "large"),
diff --git a/inst/examples/TooltipsandPopovers/ui.R b/inst/examples/TooltipsandPopovers/ui.R
index 4756d56..99c2cbc 100644
--- a/inst/examples/TooltipsandPopovers/ui.R
+++ b/inst/examples/TooltipsandPopovers/ui.R
@@ -8,12 +8,16 @@ library(shinyBS)
min = 1,
max = 50,
value = 30),
+ selectInput("pointlessSelect", "Pointless Select", choices = c("A", "B", "C"), selectize = FALSE),
+ bsTooltip("pointlessSelect", "This is another pointless input element, its just here to look pretty."),
bsTooltip("bins", "The wait times will be broken into this many equally spaced bins",
"right", options = list(container = "body"))
),
mainPanel(
plotOutput("distPlot"),
- uiOutput("uiExample")
+ dataTableOutput("dataTable"),
+ uiOutput("uiExample"),
+ bsPopover("dataTable", "A popover", "This is a popover. I hope it works.", placement = "left")
)
)
)
From fea14c40bd1d9a9083a7d5f38e14885eedf810a3 Mon Sep 17 00:00:00 2001
From: Eric
Date: Tue, 17 May 2016 06:07:57 -0400
Subject: [PATCH 88/89] updated description file
---
DESCRIPTION | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 27744fd..5d8df8a 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,13 +1,13 @@
Package: shinyBS
Type: Package
-Title: Twitter Bootstrap Components for Shiny
+Title: Extra Twitter Bootstrap Components for Shiny
Version: 0.62
Date: 2015-03-31
Author: Eric Bailey
-Maintainer: Eric Bailey
-Description: Adds additional Twitter Bootstrap components to Shiny.
+Maintainer: Eric Bailey
+Description: Adds easy access to additional Twitter Bootstrap components to Shiny.
Imports:
- shiny (>= 0.11),
+ shiny (>= 0.13.2),
htmltools
URL: https://ebailey78.github.io/shinyBS
BugReports: https://github.com/ebailey78/shinyBS/issues
From c329f8ce43e44579cafbb16fc3109fb69d403e57 Mon Sep 17 00:00:00 2001
From: baileye
Date: Fri, 1 Jul 2016 10:07:51 -0400
Subject: [PATCH 89/89] hover Alerts
---
R/bsAlert.R | 7 +++++--
inst/www/shinyBS.css | 12 ++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/R/bsAlert.R b/R/bsAlert.R
index dccc532..7e51cd3 100644
--- a/R/bsAlert.R
+++ b/R/bsAlert.R
@@ -10,9 +10,12 @@
#'@template item_details
#'@template footer
#'@export
-bsAlert <- function(anchorId) {
+bsAlert <- function(anchorId, inline = TRUE) {
- bsTag <- shiny::tags$div(class = "sbs-alert", id = anchorId, " ")
+ class <- "sbs-alert"
+ if(!inline) class = paste(class, "sbs-alert-hover")
+
+ bsTag <- shiny::tags$div(class = class, id = anchorId, " ")
htmltools::attachDependencies(bsTag, shinyBSDep)
}
diff --git a/inst/www/shinyBS.css b/inst/www/shinyBS.css
index e69de29..8a3c628 100644
--- a/inst/www/shinyBS.css
+++ b/inst/www/shinyBS.css
@@ -0,0 +1,12 @@
+.sbs-alert-hover {
+ position: absolute;
+ z-index: 1000;
+ width: 30%;
+ margin-left: 35%;
+ margin-top: 10px;
+ opacity: 0.7;
+}
+
+.sbs-alert-hover:hover {
+ opacity: 1.0;
+}
\ No newline at end of file