├── .gitignore
├── Gruntfile.js
├── LICENSE
├── README.md
├── accordion.js
├── button.js
├── css
└── main.css
├── demo.js
├── demo
├── code_sample.js
├── demo-button-colors.js
├── demo.css
├── demo.js
└── main.css
├── dialog.js
├── dist
├── jqueryui-bootstrap-adapter.js
└── jqueryui-bootstrap-adapter.min.js
├── external
├── jquery-ui.min.js
├── syntax.css
└── syntax.js
├── index.html
├── package.json
├── progressbar.js
├── selectmenu.js
├── src
├── accordion.js
├── button.js
├── dialog.js
├── menu.js
├── progressbar.js
├── selectmenu.js
├── tabs.js
└── tooltip.js
├── tabs.js
└── tooltip.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 |
3 | grunt.initConfig({
4 | pkg: grunt.file.readJSON('package.json'),
5 | concat: {
6 | options: {
7 | separator: ';'
8 | },
9 | dist: {
10 | src: ['src/**/*.js'],
11 | dest: 'dist/<%= pkg.name %>.js'
12 | }
13 | },
14 | uglify: {
15 | options: {
16 | banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
17 | },
18 | dist: {
19 | files: {
20 | 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
21 | }
22 | }
23 | },
24 | jshint: {
25 | files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
26 | options: {
27 | // options here to override JSHint defaults
28 | globals: {
29 | jQuery: true,
30 | module: true,
31 | document: true
32 | }
33 | }
34 | },
35 | watch: {
36 | files: ['<%= jshint.files %>'],
37 | tasks: ['jshint', 'concat', 'uglify' ]
38 | }
39 | });
40 |
41 | grunt.loadNpmTasks('grunt-contrib-uglify');
42 | grunt.loadNpmTasks('grunt-contrib-jshint');
43 | grunt.loadNpmTasks('grunt-contrib-watch');
44 | grunt.loadNpmTasks('grunt-contrib-concat');
45 |
46 | grunt.registerTask('test', ['jshint']);
47 |
48 | grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
49 |
50 | };
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Alexander Schmitz
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | jqueryui-bootstrap-adapter
2 | ===========================
3 |
4 | A set of default options to make jQuery UI use the twitter bootstrap theme
5 |
--------------------------------------------------------------------------------
/accordion.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Accordion Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of accordion classes to Bootstrap
11 | $.extend( $.ui.accordion.prototype.options.classes, {
12 | "ui-accordion": "panel panel-default",
13 | "ui-accordion-content": "panel-collapse collapse",
14 | "ui-accordion-content-active": "in",
15 | "ui-accordion-header": "panel-heading"
16 | });
17 |
18 | })(jQuery);
19 |
--------------------------------------------------------------------------------
/button.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Button Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of button classes to Bootstrap
11 | $.extend( $.ui.button.prototype.options.classes, {
12 | "ui-button": "btn btn-default",
13 | "ui-button-icon": "glyphicon"
14 | });
15 |
16 | })(jQuery);
17 |
--------------------------------------------------------------------------------
/css/main.css:
--------------------------------------------------------------------------------
1 | /* Bottstrap uses a tag in selector and we use a div */
2 | .ui-menu-item-wrapper {
3 | display: block;
4 | padding: 3px 20px;
5 | clear: both;
6 | font-weight: 400;
7 | line-height: 1.42857143;
8 | color: #333;
9 | white-space: nowrap;
10 | position: relative;
11 | padding: 3px 1em 3px .4em;
12 | }
13 |
14 | /* UI utility class to accessibly hide an input */
15 | .ui-helper-hidden-accessible {
16 | border: 0;
17 | clip: rect(0 0 0 0);
18 | height: 1px;
19 | margin: -1px;
20 | overflow: hidden;
21 | padding: 0;
22 | position: absolute;
23 | width: 1px;
24 | }
25 |
26 | /* small fix for selectmenu icon */
27 | .ui-selectmenu-button .ui-icon{
28 | float: right;
29 | margin-left: .75em;
30 | margin-top: 0em;
31 | }
32 | .ui-selectmenu-button .caret {
33 | margin-top: .6em;
34 | }
35 | .ui-menu-item .ui-menu{
36 | position: absolute;
37 | }
38 | .ui-menu .ui-menu-icon {
39 | left: auto;
40 | right: 0;
41 | position: absolute;
42 | top: 50%;
43 | margin-top: -8px;
44 | }
45 | .ui-selectmenu-menu {
46 | display: none;
47 | }
48 | .ui-selectmenu-menu.open {
49 | display: block;
50 | }
51 | .tab-pane {
52 | margin-top: 1em;
53 | }
54 | .panel-title {
55 | display: inline;
56 | }
57 | .progress-bar {
58 | transition: none;
59 | }
--------------------------------------------------------------------------------
/demo.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 | // Instantiate a button
3 | $( "#button" ).button();
4 |
5 | // Instantiate a button with various styles
6 | $( "#button-primary" ).button({
7 | classes: {
8 | "ui-button": "btn btn-primary"
9 | }
10 | });
11 | $( "#button-success" ).button({
12 | classes: {
13 | "ui-button": "btn btn-success"
14 | }
15 | });
16 | $( "#button-info" ).button({
17 | classes: {
18 | "ui-button": "btn btn-info"
19 | }
20 | });
21 | $( "#button-error" ).button({
22 | classes: {
23 | "ui-button": "btn btn-error"
24 | }
25 | });
26 | $( "#button-warning" ).button({
27 | classes: {
28 | "ui-button": "btn btn-warning"
29 | }
30 | });
31 | $( "#button-danger" ).button({
32 | classes: {
33 | "ui-button": "btn btn-danger"
34 | }
35 | });
36 | $( "#button-large" ).button({
37 | classes: {
38 | "ui-button": "btn btn-default btn-lg"
39 | }
40 | });
41 | $( "#button-small" ).button({
42 | classes: {
43 | "ui-button": "btn btn-default btn-sm"
44 | }
45 | });
46 | $( "#button-xsmall" ).button({
47 | classes: {
48 | "ui-button": "btn btn-default btn-xs"
49 | }
50 | });
51 |
52 | // Instantiate a button with an icon
53 | $( "#button-icon" ).button({
54 | "icon": "glyphicon-tree-conifer"
55 | });
56 |
57 | // Instantiate a selectmenu
58 | $( "#select" ).selectmenu({
59 | width: "auto",
60 | icons: {
61 | button: "caret select-icon"
62 | }
63 | });
64 |
65 | // Instantiate an icon only selectmenu for split button
66 | $( "#select-split" ).selectmenu({
67 | classes: {
68 | "ui-selectmenu-text": "sr-only"
69 | },
70 | icons: {
71 | button: "caret"
72 | },
73 | width: "auto"
74 | });
75 |
76 | // Instantiate a button for split button
77 | $( "#button-split" ).button();
78 |
79 | // Instantiate UI tabs we need to use the activate callback to toggle the
80 | // active class since UI tabs have no active class on the panel
81 | $( "#tabs" ).tabs({
82 | activate: function( e, ui ) {
83 | ui.oldPanel.toggleClass( "active" );
84 | ui.newPanel.ToggleClass( "active" );
85 | }
86 | });
87 |
88 | // Accordions are a bit complicated because of substantial markup
89 | // diferences. We need to make each pane its own accordion and then
90 | // link them using the beforeActivate callback
91 | $( ".panel" ).accordion({
92 | collapsible: true,
93 | active: "false",
94 | beforeActivate: function( e , ui ){
95 | if( ui.newPanel.length > 0 ){
96 | $( this ).parent().children().not( this ).accordion( "option", "active", false );
97 | }
98 | }
99 | }).eq( 0 ).accordion( "option", "active", 0 );
100 |
101 | // Instantiate UI Tooltip
102 | $( document ).tooltip({
103 | show: false,
104 | position: {
105 | my: "center bottom",
106 | at: "center top",
107 | using: function( position, feedback ) {
108 | $( this ).css( position );
109 | $( "
" )
110 | .addClass( "tooltip-arrow" )
111 | .appendTo( this );
112 | }
113 | }
114 | });
115 |
116 | // Instantiate UI Dialog
117 | $( "#dialog" ).dialog({
118 | autoOpen: false,
119 | buttons: [
120 | {
121 | text: "foo",
122 | "class": "btn-primary",
123 | click: $.noop
124 | }
125 | ]
126 | });
127 | $( "#progressbar" ).progressbar({
128 | value: 67,
129 | classes: {
130 | "ui-progressbar": "progress",
131 | "ui-progressbar-value": "progress-bar"
132 | }
133 | });
134 |
135 | });
136 |
--------------------------------------------------------------------------------
/demo/code_sample.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 | // This is for generating code samples
3 | $( ".sample-container" ).each(function(){
4 | var html = $( this ).html().replace( //g, ">" );
5 |
6 | $( this ).after( "
" );
7 | });
8 | $( ".sample-accordion" ).accordion({
9 | active: false,
10 | collapsible: true,
11 | classes: {
12 | "ui-accordion": "",
13 | "ui-accordion-header": ""
14 | }
15 | });
16 | });
--------------------------------------------------------------------------------
/demo/demo-button-colors.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 | // Instantiate a button
3 | $( "#button" ).button();
4 |
5 | // Instantiate a button with various styles
6 | $( "#button-primary" ).button({
7 | classes: {
8 | "ui-button": "btn btn-primary"
9 | }
10 | });
11 | $( "#button-success" ).button({
12 | classes: {
13 | "ui-button": "btn btn-success"
14 | }
15 | });
16 | $( "#button-info" ).button({
17 | classes: {
18 | "ui-button": "btn btn-info"
19 | }
20 | });
21 | $( "#button-error" ).button({
22 | classes: {
23 | "ui-button": "btn btn-error"
24 | }
25 | });
26 | $( "#button-warning" ).button({
27 | classes: {
28 | "ui-button": "btn btn-warning"
29 | }
30 | });
31 | $( "#button-danger" ).button({
32 | classes: {
33 | "ui-button": "btn btn-danger"
34 | }
35 | });
36 | });
37 |
--------------------------------------------------------------------------------
/demo/demo.css:
--------------------------------------------------------------------------------
1 | /* these rules are just to make the demo look pretty */
2 | .btn {
3 | margin-bottom:.3em;
4 | }
5 | .ui-menu {
6 | width: 300px;
7 | }
8 | .scroll-link {
9 | position:relative;
10 | top: -50px;
11 | }
12 | .component-container {
13 | border-radius: 4px;
14 | border: solid 1px #ccc;
15 | padding: 1em;
16 | }
17 | .sample-accordion .ui-accordion-content {
18 | background: #333;
19 | }
20 | .sample-accordion {
21 | margin-bottom: 3em;
22 | }
23 | .toolbar {
24 | display: none;
25 | }
26 | .social-button {
27 | font-size:2.8em;
28 | padding: 5px !important;
29 | }
30 | .navbar-right {
31 | right: 20px;
32 | position: relative;
33 | }
--------------------------------------------------------------------------------
/demo/demo.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 |
3 | // Syntax highlighting for code samples
4 | SyntaxHighlighter.all();
5 |
6 | // Apply active style to menu items as we scroll
7 | $( ".scroll-link" ).waypoint(function(){
8 | $( "nav .active" ).removeClass( "active" );
9 | $( "[href$='" + this.id + "']" ).parent().addClass( "active" );
10 | });
11 | // toggle menu on narrow viewports
12 | $( ".navbar-toggle" ).click(function(){
13 | $( "#navbar" ).toggleClass( "in" );
14 | });
15 | // Insert a hr after every h2 for nice look
16 | $( "h2" ).after( "
" );
17 |
18 | // Hover H1 copy
19 | var link = $( "
").appendTo( "body" );
20 | $( "h1" ).on( "mouseover" , function(){
21 | var position = $( this ).position();
22 |
23 | position.position = "absolute";
24 | position.top = position.top + 33;
25 | position.left = position.left - 20;
26 | link.css(position).show();
27 | }).on( "mouseleave", function(){
28 | link.hide();
29 | }).click(function(){
30 | history.replaceState( {}, "Link", "#"+$( this ).prev( ".scroll-link" ).attr( "id" ) );
31 | });
32 | });
33 |
--------------------------------------------------------------------------------
/demo/main.css:
--------------------------------------------------------------------------------
1 | /* these rules are just to make the demo look pretty */
2 | body {
3 | padding: 1em;
4 | }
5 | .btn {
6 | margin-bottom:.3em;
7 | }
--------------------------------------------------------------------------------
/dialog.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Dialog Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Converstion of dialog classes to Bootstrap
11 | $.extend( $.ui.dialog.prototype.options.classes, {
12 | "ui-dialog": "modal-content",
13 | "ui-dialog-titlebar": "modal-header",
14 | "ui-dialog-title": "modal-title",
15 | "ui-dialog-titlebar-close": "close",
16 | "ui-dialog-content": "modal-body",
17 | "ui-dialog-buttonpane": "modal-footer"
18 | });
19 |
20 | })(jQuery);
21 |
--------------------------------------------------------------------------------
/dist/jqueryui-bootstrap-adapter.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Accordion Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of accordion classes to Bootstrap
11 | $.ui.accordion.prototype.options.classes[ "ui-accordion" ] = "panel panel-default";
12 | $.ui.accordion.prototype.options.classes[ "ui-accordion-content" ] = "panel-collapse collapse";
13 | $.ui.accordion.prototype.options.classes[ "ui-accordion-content-active" ] = "in";
14 | $.ui.accordion.prototype.options.classes[ "ui-accordion-header" ] = "panel-heading";
15 |
16 | })(jQuery);
17 | ;/*!
18 | * jQuery UI Button Bootstrap Adapter
19 | *
20 | *
21 | * Copyright 2014 Alexander Schmitz
22 | * Released under the MIT license.
23 | */
24 | (function( $, undefined ) {
25 |
26 | // Conversion of button classes to Bootstrap
27 | $.ui.button.prototype.options.classes[ "ui-button" ] = "btn btn-default";
28 | $.ui.button.prototype.options.classes[ "ui-button-icon" ] = "glyphicon";
29 |
30 | })(jQuery);
31 | ;/*!
32 | * jQuery UI Dialog Bootstrap Adapter
33 | *
34 | *
35 | * Copyright 2014 Alexander Schmitz
36 | * Released under the MIT license.
37 | */
38 | (function( $, undefined ) {
39 |
40 | // Converstion of dialog classes to Bootstrap
41 | $.ui.dialog.prototype.options.classes[ "ui-dialog" ] = "modal-content";
42 | $.ui.dialog.prototype.options.classes[ "ui-dialog-titlebar" ] = "modal-header";
43 | $.ui.dialog.prototype.options.classes[ "ui-dialog-title" ] = "modal-title";
44 | $.ui.dialog.prototype.options.classes[ "ui-dialog-titlebar-close" ] = "close";
45 | $.ui.dialog.prototype.options.classes[ "ui-dialog-content" ] = "modal-body";
46 | $.ui.dialog.prototype.options.classes[ "ui-dialog-buttonpane" ] = "modal-footer";
47 |
48 | })(jQuery);
49 | ;/*!
50 | * jQuery UI Menu Bootstrap Adapter
51 | *
52 | *
53 | * Copyright 2014 Alexander Schmitz
54 | * Released under the MIT license.
55 | */
56 | (function( $, undefined ) {
57 |
58 | // Conversion of menu classes to Bootstrap
59 | $.ui.menu.prototype.options.classes[ "ui-menu" ] = "list-group";
60 | $.ui.menu.prototype.options.classes[ "ui-menu-icons" ] = "";
61 | $.ui.menu.prototype.options.classes[ "ui-menu-icon" ] = "glyphicon glyphicon-chevron-right";
62 | $.ui.menu.prototype.options.classes[ "ui-menu-item" ] = "list-group-item";
63 | $.ui.menu.prototype.options.classes[ "ui-menu-divider" ] = "";
64 | $.ui.menu.prototype.options.classes[ "ui-menu-item-wrapper" ] = "";
65 |
66 | })(jQuery);
67 | ;/*!
68 | * jQuery UI Progressbar Bootstrap Adapter
69 | *
70 | *
71 | * Copyright 2014 Alexander Schmitz
72 | * Released under the MIT license.
73 | */
74 | (function( $, undefined ) {
75 |
76 | // Conversion of progressbar classes to Bootstrap
77 | $.ui.progressbar.prototype.options.classes[ "ui-progressbar" ] = "progress";
78 | $.ui.progressbar.prototype.options.classes[ "ui-progressbar-value" ] = "progress-bar";
79 |
80 | })(jQuery);
81 | ;/*!
82 | * jQuery UI Selectmenu Bootstrap Adapter
83 | *
84 | *
85 | * Copyright 2014 Alexander Schmitz
86 | * Released under the MIT license.
87 | */
88 | (function( $, undefined ) {
89 |
90 | $.ui.selectmenu.prototype.options.classes[ "ui-selectmenu-button" ] = "btn btn-default dropdown-toggle";
91 | $.ui.selectmenu.prototype.options.classes[ "ui-selectmenu-open" ] = "open" ;
92 | $.ui.selectmenu.prototype.options.icons.button = "caret";
93 | $.ui.selectmenu.prototype.options.width = "auto";
94 |
95 | })(jQuery);
96 | ;/*!
97 | * jQuery UI Tabs Bootstrap Adapter
98 | *
99 | *
100 | * Copyright 2014 Alexander Schmitz
101 | * Released under the MIT license.
102 | */
103 | (function( $, undefined ) {
104 |
105 | // Conversion of tabs classes to Bootstrap
106 | $.ui.tabs.prototype.options.classes[ "ui-tabs-nav" ] = "nav nav-tabs";
107 | $.ui.tabs.prototype.options.classes[ "ui-tabs-panel" ] = "tab-pane";
108 | $.ui.tabs.prototype.options.classes[ "ui-tabs-active" ] = "active";
109 |
110 | })(jQuery);
111 | ;/*!
112 | * jQuery UI Tooltip Bootstrap Adapter
113 | *
114 | *
115 | * Copyright 2014 Alexander Schmitz
116 | * Released under the MIT license.
117 | */
118 | (function( $, undefined ) {
119 |
120 | // Conversion of tooltip classes to Bootstrap
121 | $.ui.tooltip.prototype.options.classes[ "ui-tooltip" ] = "tooltip top fade in";
122 | $.ui.tooltip.prototype.options.classes[ "ui-tooltip-content" ] = "tooltip-inner";
123 |
124 | })(jQuery);
125 |
--------------------------------------------------------------------------------
/dist/jqueryui-bootstrap-adapter.min.js:
--------------------------------------------------------------------------------
1 | /*! jqueryui-bootstrap-adapter 20-11-2014 */
2 | (function(o){o.ui.accordion.prototype.options.classes["ui-accordion"]="panel panel-default",o.ui.accordion.prototype.options.classes["ui-accordion-content"]="panel-collapse collapse",o.ui.accordion.prototype.options.classes["ui-accordion-content-active"]="in",o.ui.accordion.prototype.options.classes["ui-accordion-header"]="panel-heading"})(jQuery),function(o){o.ui.button.prototype.options.classes["ui-button"]="btn btn-default",o.ui.button.prototype.options.classes["ui-button-icon"]="glyphicon"}(jQuery),function(o){o.ui.dialog.prototype.options.classes["ui-dialog"]="modal-content",o.ui.dialog.prototype.options.classes["ui-dialog-titlebar"]="modal-header",o.ui.dialog.prototype.options.classes["ui-dialog-title"]="modal-title",o.ui.dialog.prototype.options.classes["ui-dialog-titlebar-close"]="close",o.ui.dialog.prototype.options.classes["ui-dialog-content"]="modal-body",o.ui.dialog.prototype.options.classes["ui-dialog-buttonpane"]="modal-footer"}(jQuery),function(o){o.ui.menu.prototype.options.classes["ui-menu"]="list-group",o.ui.menu.prototype.options.classes["ui-menu-icons"]="",o.ui.menu.prototype.options.classes["ui-menu-icon"]="glyphicon glyphicon-chevron-right",o.ui.menu.prototype.options.classes["ui-menu-item"]="list-group-item",o.ui.menu.prototype.options.classes["ui-menu-divider"]="",o.ui.menu.prototype.options.classes["ui-menu-item-wrapper"]=""}(jQuery),function(o){o.ui.progressbar.prototype.options.classes["ui-progressbar"]="progress",o.ui.progressbar.prototype.options.classes["ui-progressbar-value"]="progress-bar"}(jQuery),function(o){o.ui.selectmenu.prototype.options.classes["ui-selectmenu-button"]="btn btn-default dropdown-toggle",o.ui.selectmenu.prototype.options.classes["ui-selectmenu-open"]="open",o.ui.selectmenu.prototype.options.icons.button="caret",o.ui.selectmenu.prototype.options.width="auto"}(jQuery),function(o){o.ui.tabs.prototype.options.classes["ui-tabs-nav"]="nav nav-tabs",o.ui.tabs.prototype.options.classes["ui-tabs-panel"]="tab-pane",o.ui.tabs.prototype.options.classes["ui-tabs-active"]="active"}(jQuery),function(o){o.ui.tooltip.prototype.options.classes["ui-tooltip"]="tooltip top fade in",o.ui.tooltip.prototype.options.classes["ui-tooltip-content"]="tooltip-inner"}(jQuery);
--------------------------------------------------------------------------------
/external/syntax.css:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * SyntaxHighlighter
4 | * http://alexgorbatchev.com/SyntaxHighlighter
5 | *
6 | * SyntaxHighlighter is donationware. If you are using it, please donate.
7 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
8 | *
9 | * @version
10 | * 3.0.83 (July 02 2010)
11 | *
12 | * @copyright
13 | * Copyright (C) 2004-2010 Alex Gorbatchev.
14 | *
15 | * @license
16 | * Dual licensed under the MIT and GPL licenses.
17 | */
18 | .syntaxhighlighter a,
19 | .syntaxhighlighter div,
20 | .syntaxhighlighter code,
21 | .syntaxhighlighter table,
22 | .syntaxhighlighter table td,
23 | .syntaxhighlighter table tr,
24 | .syntaxhighlighter table tbody,
25 | .syntaxhighlighter table thead,
26 | .syntaxhighlighter table caption,
27 | .syntaxhighlighter textarea {
28 | background: none;
29 | border: 0;
30 | bottom: auto;
31 | float: none;
32 | left: auto;
33 | height: auto;
34 | line-height: 18px;
35 | margin: 0;
36 | outline: 0;
37 | overflow: visible;
38 | padding: 0;
39 | position: static;
40 | right: auto;
41 | text-align: left;
42 | top: auto;
43 | vertical-align: baseline;
44 | width: auto;
45 | box-sizing: content-box;
46 | font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
47 | font-weight: normal;
48 | font-style: normal;
49 | font-size: 14px;
50 | min-height: inherit;
51 | min-height: auto;
52 | }
53 | .syntaxhighlighter {
54 | width: auto;
55 | margin: 0;
56 | padding: 1em 0;
57 | position: relative;
58 | overflow: auto;
59 | font-size: 13px;
60 | }
61 | .syntaxhighlighter.source {
62 | overflow: hidden;
63 | }
64 | .syntaxhighlighter .bold {
65 | font-weight: bold;
66 | }
67 | .syntaxhighlighter .italic {
68 | font-style: italic;
69 | }
70 | .syntaxhighlighter .line {
71 | white-space: pre;
72 | white-space: pre-wrap;
73 | }
74 | .syntaxhighlighter table {
75 | width: 100%;
76 | }
77 | .syntaxhighlighter table caption {
78 | text-align: left;
79 | padding: .5em 0 0.5em 1em;
80 | }
81 | .syntaxhighlighter table td.code {
82 | width: 100%;
83 | }
84 | .syntaxhighlighter table td.code .container {
85 | position: relative;
86 | }
87 | .syntaxhighlighter table td.code .container textarea {
88 | box-sizing: border-box;
89 | position: absolute;
90 | left: 0;
91 | top: 0;
92 | width: 100%;
93 | height: 100%;
94 | border: none;
95 | background: white;
96 | padding-left: 1em;
97 | overflow: hidden;
98 | white-space: pre;
99 | }
100 | .syntaxhighlighter table td.gutter .line {
101 | text-align: right;
102 | padding: 0 0.5em 0 1em;
103 | }
104 | .syntaxhighlighter table td.code .line {
105 | padding: 0 1em;
106 | }
107 | .syntaxhighlighter.show {
108 | display: block;
109 | }
110 | .syntaxhighlighter.collapsed table {
111 | display: none;
112 | }
113 | .syntaxhighlighter .line.alt1 {
114 | background-color: transparent;
115 | }
116 | .syntaxhighlighter .line.alt2 {
117 | background-color: transparent;
118 | }
119 | .syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
120 | background-color: #253e5a;
121 | }
122 | .syntaxhighlighter .line.highlighted.number {
123 | color: #38566f;
124 | }
125 | .syntaxhighlighter table caption {
126 | color: #d1edff;
127 | }
128 | .syntaxhighlighter .gutter {
129 | color: #afafaf;
130 | }
131 | .syntaxhighlighter .gutter .line {
132 | border-right: 3px solid #435a5f;
133 | }
134 | .syntaxhighlighter .gutter .line.highlighted {
135 | background-color: #435a5f;
136 | color: #0f192a;
137 | }
138 | .syntaxhighlighter.collapsed {
139 | overflow: visible;
140 | }
141 | .syntaxhighlighter .plain, .syntaxhighlighter .plain a {
142 | color: #eee;
143 | }
144 | .syntaxhighlighter .comments, .syntaxhighlighter .comments a {
145 | color: #5ba1cf;
146 | }
147 | .syntaxhighlighter .string {
148 | color: #98da31;
149 | }
150 | .syntaxhighlighter .string a {
151 | color: #1dc116;
152 | }
153 | .syntaxhighlighter .keyword {
154 | color: #ffae00;
155 | }
156 | .syntaxhighlighter .preprocessor {
157 | color: #8aa6c1;
158 | }
159 | .syntaxhighlighter .variable {
160 | color: #ffaa3e;
161 | }
162 | .syntaxhighlighter .value {
163 | color: #f7e741;
164 | }
165 | .syntaxhighlighter .functions {
166 | color: #ffaa3e;
167 | }
168 | .syntaxhighlighter .constants {
169 | color: #e0e8ff;
170 | }
171 | .syntaxhighlighter .script {
172 | font-weight: bold;
173 | color: #b43d3d;
174 | background-color: none;
175 | }
176 | .syntaxhighlighter .color1 {
177 | color: #8df;
178 | }
179 | .syntaxhighlighter .color1 a {
180 | color: #f8bb00;
181 | }
182 | .syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
183 | color: white;
184 | }
185 | .syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
186 | color: #ffaa3e;
187 | }
188 | .syntaxhighlighter table td.code {
189 | cursor: text;
190 | }
191 | .syntaxhighlighter table td.code .container textarea {
192 | background: #eee;
193 | white-space: pre;
194 | white-space: pre-wrap;
195 | }
196 | .syntaxhighlighter ::-moz-selection {
197 | background-color: #3399ff;
198 | color: #fff;
199 | text-shadow: none;
200 | }
201 | .syntaxhighlighter ::-webkit-selection {
202 | background-color: #3399ff;
203 | color: #fff;
204 | text-shadow: none;
205 | }
206 | .syntaxhighlighter ::selection {
207 | background-color: #3399ff;
208 | color: #fff;
209 | text-shadow: none;
210 | }
211 |
--------------------------------------------------------------------------------
/external/syntax.js:
--------------------------------------------------------------------------------
1 | /**
2 | * SyntaxHighlighter
3 | * http://alexgorbatchev.com/SyntaxHighlighter
4 | *
5 | * SyntaxHighlighter is donationware. If you are using it, please donate.
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 | *
8 | * @version
9 | * 3.0.83 (July 02 2010)
10 | *
11 | * @copyright
12 | * Copyright (C) 2004-2010 Alex Gorbatchev.
13 | *
14 | * @license
15 | * Dual licensed under the MIT and GPL licenses.
16 | */
17 | eval(function(p,a,c,k,e,d){e=function(c){return(c
35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function() {return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a-1},3d:6(g){e+=g}};c1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;be.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;dd.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a\'+c+"17>"});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.Pb.P)H 1;Y I(a.Lb.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'\'+c+" "+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v1t>3J><3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;">1v 3v 3.0.76 (72 73 3x) 1Z://3u.2w/1v 70 17 6U 71. 6T 6X-3x 6Y 6D. 6t 61 60 J 1k, 5Z 5R 5V <2R/>5U 5T 5S! 3B>1z>\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'\',d=e.16.2x,h=d.2X,g=0;g";H c},2o:6(a,b,c){H\'<2W>\'+c+" 2W>"},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;md)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P\'+c+" "},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i\'+j+"17>":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"4a>":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"2d>":"")+\'<2d 1g="17">\'+b+" 2d>3P>3T>3Z>"},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{}))
18 |
19 | ;(function()
20 | {
21 | // CommonJS
22 | //typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
23 |
24 | function Brush()
25 | {
26 | function process(match, regexInfo)
27 | {
28 | var constructor = SyntaxHighlighter.Match,
29 | code = match[0],
30 | tag = new XRegExp('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code),
31 | result = []
32 | ;
33 |
34 | if (match.attributes != null)
35 | {
36 | var attributes,
37 | regex = new XRegExp('(? [\\w:\\-\\.]+)' +
38 | '\\s*=\\s*' +
39 | '(? ".*?"|\'.*?\'|\\w+)',
40 | 'xg');
41 |
42 | while ((attributes = regex.exec(code)) != null)
43 | {
44 | result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
45 | result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
46 | }
47 | }
48 |
49 | if (tag != null)
50 | result.push(
51 | new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
52 | );
53 |
54 | return result;
55 | }
56 |
57 | this.regexList = [
58 | { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, //
59 | { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, //
60 | { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process }
61 | ];
62 | };
63 |
64 | Brush.prototype = new SyntaxHighlighter.Highlighter();
65 | Brush.aliases = ['xml', 'xhtml', 'xslt', 'html'];
66 |
67 | SyntaxHighlighter.brushes.Xml = Brush;
68 |
69 | // CommonJS
70 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
71 | })();
72 |
73 | ;(function()
74 | {
75 | // CommonJS
76 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
77 |
78 | function Brush()
79 | {
80 | var keywords = 'break case catch continue ' +
81 | 'default delete do else false ' +
82 | 'for function if in instanceof ' +
83 | 'new null return super switch ' +
84 | 'this throw true try typeof var while with'
85 | ;
86 |
87 | var r = SyntaxHighlighter.regexLib;
88 |
89 | this.regexList = [
90 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
91 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
92 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments
93 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
94 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
95 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
96 | ];
97 |
98 | this.forHtmlScript(r.scriptScriptTags);
99 | };
100 |
101 | Brush.prototype = new SyntaxHighlighter.Highlighter();
102 | Brush.aliases = ['js', 'jscript', 'javascript'];
103 |
104 | SyntaxHighlighter.brushes.JScript = Brush;
105 |
106 | // CommonJS
107 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
108 | })();
109 |
110 | ;(function()
111 | {
112 | // CommonJS
113 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
114 |
115 | function Brush()
116 | {
117 | function getKeywordsCSS(str)
118 | {
119 | return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
120 | };
121 |
122 | function getValuesCSS(str)
123 | {
124 | return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
125 | };
126 |
127 | var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
128 | 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
129 | 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
130 | 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
131 | 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
132 | 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
133 | 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
134 | 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
135 | 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width opacity orphans ' +
136 | 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
137 | 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
138 | 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
139 | 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
140 | 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
141 |
142 | var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
143 | 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
144 | 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
145 | 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
146 | 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
147 | 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
148 | 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
149 | 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
150 | 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
151 | 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
152 | 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
153 | 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
154 | 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
155 | 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
156 |
157 | var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
158 |
159 | this.regexList = [
160 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
161 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
162 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
163 | { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
164 | { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
165 | { regex: /!important/g, css: 'color3' }, // !important
166 | { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
167 | { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
168 | { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
169 | ];
170 |
171 | this.forHtmlScript({
172 | left: /(<|<)\s*style.*?(>|>)/gi,
173 | right: /(<|<)\/\s*style\s*(>|>)/gi
174 | });
175 | };
176 |
177 | Brush.prototype = new SyntaxHighlighter.Highlighter();
178 | Brush.aliases = ['css'];
179 |
180 | SyntaxHighlighter.brushes.CSS = Brush;
181 |
182 | // CommonJS
183 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
184 | })();
185 |
186 | ;(function()
187 | {
188 | // CommonJS
189 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
190 |
191 | function Brush()
192 | {
193 | var funcs = 'abs acos acosh addcslashes addslashes ' +
194 | 'array_change_key_case array_chunk array_combine array_count_values array_diff '+
195 | 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
196 | 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
197 | 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
198 | 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
199 | 'array_push array_rand array_reduce array_reverse array_search array_shift '+
200 | 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
201 | 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
202 | 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
203 | 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
204 | 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
205 | 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
206 | 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
207 | 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
208 | 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
209 | 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
210 | 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
211 | 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
212 | 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
213 | 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
214 | 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
215 | 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
216 | 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
217 | 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
218 | 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
219 | 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
220 | 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
221 | 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+
222 | 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
223 | 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
224 | 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
225 | 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
226 | 'strtoupper strtr strval substr substr_compare';
227 |
228 | var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' +
229 | 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' +
230 | 'function include include_once global goto if implements interface instanceof namespace new ' +
231 | 'old_function or private protected public return require require_once static switch ' +
232 | 'throw try use var while xor ';
233 |
234 | var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
235 |
236 | this.regexList = [
237 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
238 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
239 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
240 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
241 | { regex: /\$\w+/g, css: 'variable' }, // variables
242 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
243 | { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
244 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
245 | ];
246 |
247 | this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
248 | };
249 |
250 | Brush.prototype = new SyntaxHighlighter.Highlighter();
251 | Brush.aliases = ['php'];
252 |
253 | SyntaxHighlighter.brushes.Php = Brush;
254 |
255 | // CommonJS
256 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
257 | })();
258 |
259 | /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
260 | * Licensed under the MIT License (LICENSE.txt).
261 | *
262 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
263 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
264 | * Thanks to: Seamus Leahy for adding deltaX and deltaY
265 | *
266 | * Version: 3.0.6
267 | *
268 | * Requires: 1.2.2+
269 | */
270 |
271 | (function($) {
272 | var types = ['DOMMouseScroll', 'mousewheel'];
273 |
274 | if ($.event.fixHooks) {
275 | for ( var i=types.length; i; ) {
276 | $.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
277 | }
278 | }
279 | $.event.special.mousewheel = {
280 | setup: function() {
281 | if ( this.addEventListener ) {
282 | for ( var i=types.length; i; ) {
283 | this.addEventListener( types[--i], handler, false );
284 | }
285 | } else {
286 | this.onmousewheel = handler;
287 | }
288 | },
289 | teardown: function() {
290 | if ( this.removeEventListener ) {
291 | for ( var i=types.length; i; ) {
292 | this.removeEventListener( types[--i], handler, false );
293 | }
294 | } else {
295 | this.onmousewheel = null;
296 | }
297 | }
298 | };
299 | $.fn.extend({
300 | mousewheel: function(fn) {
301 | return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
302 | },
303 |
304 | unmousewheel: function(fn) {
305 | return this.unbind("mousewheel", fn);
306 | }
307 | });
308 | function handler(event) {
309 | var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
310 | event = $.event.fix(orgEvent);
311 | event.type = "mousewheel";
312 |
313 | // Old school scrollwheel delta
314 | if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
315 | if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
316 | // New school multidimensional scroll (touchpads) deltas
317 | deltaY = delta;
318 | // Gecko
319 | if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
320 | deltaY = 0;
321 | deltaX = -1*delta;
322 | }
323 | // Webkit
324 | if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
325 | if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
326 | // Add event and delta to the front of the arguments
327 | args.unshift(event, delta, deltaX, deltaY);
328 |
329 | return ($.event.dispatch || $.event.handle).apply(this, args);
330 | }
331 | })(jQuery);
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | jQuery UI + Bootstrap Rocks
20 |
21 |
22 |
23 |
51 |
52 |
53 |
54 |
55 |
jQuery UI + Bootstrap
56 |
The jQuery UI Bootstrap adapter is a very small js file ( 473 bytes gzipped ) which changes the jQuery UI Classes presets to use the Twitter Bootstrap theme
57 |
58 |
59 |
60 |
61 |
Requires jQuery UI 1.12+
62 |
63 |
64 |
65 |
66 |
67 |
76 |
77 |
78 |
Button colors
79 |
80 | Button
81 | Button Primary
82 | Button Success
83 | Button Info
84 | Button Warning
85 | Button Danger
86 |
92 |
93 |
Button Sizes
94 |
95 | Button Large
96 | Button Default
97 | Button Small
98 | Button Extra Small
99 |
105 |
106 |
Buttons With Icons
107 |
108 | Button with tree
109 | Button with music
110 | Button with heart
111 | Button with fire
112 |
129 |
130 |
131 |
132 |
Selectmenu
133 |
148 |
149 |
150 |
Selectmenu Colors
151 |
152 |
153 | Default
154 | Option 1
155 | Option 2
156 | option 3
157 |
158 |
159 | Primary
160 | Option 1
161 | Option 2
162 | option 3
163 |
164 |
165 | Success
166 | Option 1
167 | Option 2
168 | option 3
169 |
170 |
171 | Info
172 | Option 1
173 | Option 2
174 | option 3
175 |
176 |
177 | Warning
178 | Option 1
179 | Option 2
180 | option 3
181 |
182 |
183 | Danger
184 | Option 1
185 | Option 2
186 | option 3
187 |
188 |
218 |
219 |
Selectmenu Icons
220 |
221 |
222 | Trees
223 | Pine
224 | Oak
225 | Maple
226 |
227 |
228 | Genres
229 | Rock
230 | Country
231 | Rap
232 |
233 |
234 | Movie Type
235 | Action
236 | Documentary
237 | Romantic
238 |
239 |
258 |
259 |
260 |
261 |
Split Button
262 |
263 |
The splitbutton
264 |
Combines a regular button and a dropdown into a single button. the split button is not a widget in jQuery UI on its own but instead is just a combination of a button widget and a selectmenu widget in a container.
265 |
API Documentation
266 |
The Bootstrap adapter makes no changes specificly for the split button this is encluded as an example.
267 |
268 |
269 |
270 |
Split Buttons
271 |
272 |
273 | Run last option
274 |
275 | Open...
276 | Save
277 | Delete
278 |
279 |
280 |
293 |
294 |
295 |
296 |
Tabs
297 |
298 |
The tabs widget
299 |
A single content area with multiple panels, each associated with a header in a list.
300 |
API Documentation
301 |
The Bootstrap adapter makes the fllowing change to the classes option defaults:
302 |
303 | "ui-tabs-nav": "nav nav-tabs",
304 | "ui-tabs-panel": "tab-pane",
305 | "ui-tabs-active": "active"
306 |
307 |
308 |
309 |
Default Tabs
310 |
311 |
312 |
317 |
318 |
319 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
320 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
321 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
322 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
323 |
324 |
325 |
326 |
327 | Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
328 | purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
329 | velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
330 | suscipit faucibus urna.
331 |
332 |
333 |
334 | Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
335 | Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
336 | ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
337 | lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
338 |
339 |
340 | List item one
341 | List item two
342 | List item three
343 |
344 |
345 |
346 |
352 |
353 |
Collapsible tabs
354 |
355 |
356 |
361 |
362 |
Click this tab again to close the content pane.
363 |
364 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
365 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
366 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
367 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
368 |
369 |
370 |
371 |
Click this tab again to close the content pane.
372 |
373 | Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
374 | purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
375 | velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
376 | suscipit faucibus urna.
377 |
378 |
379 |
380 |
Click this tab again to close the content pane.
381 | Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
382 | Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
383 | ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
384 | lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
385 |
386 |
387 | List item one
388 | List item two
389 | List item three
390 |
391 |
392 |
393 |
401 |
402 |
Vertical tabs
403 |
404 |
405 |
410 |
411 |
412 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
413 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
414 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
415 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
416 |
417 |
418 |
419 |
420 | Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
421 | purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
422 | velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
423 | suscipit faucibus urna.
424 |
425 |
426 |
427 |
428 | Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
429 | Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
430 | ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
431 | lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
432 |
433 |
434 | List item one
435 | List item two
436 | List item three
437 |
438 |
439 |
440 |
452 |
462 |
463 |
464 |
465 |
Accordion
466 |
467 |
The accordion widget
468 |
Displays collapsible content panels for presenting information in a limited amount of space.
469 |
API Documentation
470 |
The Bootstrap adapter makes the fllowing change to the classes option defaults:
471 |
472 | "ui-accordion": "panel panel-default",
473 | "ui-accordion-content": "panel-collapse collapse",
474 | "ui-accordion-content-active": "in",
475 | "ui-accordion-header": "panel-heading"
476 |
Notice: The accordion widget due to substantial differences in markup requires some extra javascript to function please view source on examples
477 |
478 |
479 |
480 |
Default Accordion
481 |
482 |
483 |
484 |
485 |
Section 1
486 |
487 |
488 |
489 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
490 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
491 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
492 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
493 |
494 |
495 |
496 |
497 |
498 |
Section 2
499 |
500 |
501 |
502 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
503 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
504 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
505 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
506 |
507 |
508 |
509 |
510 |
511 |
Section 3
512 |
513 |
514 |
515 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
516 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
517 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
518 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
519 |
520 |
521 |
522 |
523 |
540 |
541 |
Accordion With Custom Icons
542 |
543 |
544 |
545 |
546 |
Section 1
547 |
548 |
549 |
550 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
551 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
552 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
553 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
554 |
555 |
556 |
557 |
558 |
559 |
Section 2
560 |
561 |
562 |
563 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
564 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
565 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
566 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
567 |
568 |
569 |
570 |
571 |
572 |
Section 3
573 |
574 |
575 |
576 | Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
577 | ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
578 | amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
579 | odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
580 |
581 |
582 |
583 |
584 |
605 |
606 |
607 |
608 |
Tooltip
609 |
610 |
The tooltip widget
611 |
Customizable, themeable tooltips, replacing native tooltips
612 |
API Documentation
613 |
The Bootstrap adapter makes the fllowing change to the classes option defaults:
614 |
615 | "ui-tooltip": "tooltip top fade in",
616 | "ui-tooltip-content": "tooltip-inner"
617 |
618 |
619 |
620 |
Default Tooltip
621 |
641 |
710 |
711 |
712 |
Dialog
713 |
714 |
The dialog widget
715 |
Open content in an interactive overlay.
716 |
API Documentation
717 |
The Bootstrap adapter makes the fllowing change to the classes option defaults:
718 |
719 | "ui-dialog": "modal-content",
720 | "ui-dialog-titlebar": "modal-header",
721 | "ui-dialog-title": "modal-title",
722 | "ui-dialog-titlebar-close": "close",
723 | "ui-dialog-content": "modal-body",
724 | "ui-dialog-buttonpane": "modal-footer"
725 |
726 |
727 |
728 |
Default Dialog
729 |
730 |
I'm a dialog!
731 |
Open Dialog
732 |
750 |
751 |
Animated Dialog
752 |
753 |
Open Animated Dialog
754 |
755 |
This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.
756 |
757 |
783 |
784 |
785 |
786 |
Progressbar
787 |
788 |
The progressbar widget
789 |
Display status of a determinate or indeterminate process.
790 |
API Documentation
791 |
The Bootstrap adapter makes the fllowing change to the classes option defaults:
792 |
793 | "ui-progressbar": "progress",
794 | "ui-progressbar-value": "progress-bar"
795 |
796 |
797 |
798 |
Default Progressbar
799 |
807 |
Custom label and callback
808 |
809 |
810 |
Start
811 |
823 |
851 |
852 |
853 |
854 |
Menu
855 |
856 |
The Menu widget
857 |
Themeable menu with mouse and keyboard interactions for navigation.
858 |
API Documentation
859 |
The Bootstrap adapter makes the fllowing change to the classes option defaults:
860 |
"ui-menu": "list-group",
861 | "ui-menu-icons": "",
862 | "ui-menu-icon": "glyphicon glyphicon-chevron-right",
863 | "ui-menu-item": "list-group-item",
864 | "ui-menu-divider": "",
865 | "ui-menu-item-wrapper": ""
866 |
867 |
868 |
869 |
Default Menu
870 |
871 |
905 |
910 |
911 |
Menu with icons
912 |
913 |
947 |
952 |
957 |
958 |
959 |
960 |
961 |
962 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jqueryui-bootstrap-adapter",
3 | "title": "jQuery UI Bootstrap Adapter",
4 | "description": "A set of default values to make jQuery UI work with Twitter bootstrap",
5 | "version": "0.3.0",
6 | "homepage": "https://github.com/arschmitz/jqueryui-bootstrap-adapter",
7 | "author": {
8 | "name": "Alexander Schmitz",
9 | "url": "https://github.com/arschmitz/"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git://github.com/arschmitz/jqueryui-bootstrap-adapter.git"
14 | },
15 | "bugs": "https://github.com/arschmitz/jqueryui-bootstrap-adapter/issues/",
16 | "licenses": [
17 | {
18 | "type": "MIT",
19 | "url": "https://github.com/arschmitz/jqueryui-bootstrap-adapter/blob/master/LICENSE.txt"
20 | }
21 | ],
22 | "scripts": {
23 | "test": "grunt"
24 | },
25 | "dependencies": {},
26 | "devDependencies": {
27 | "commitplease": "2.0.0",
28 | "grunt": "0.4.2",
29 | "grunt-bowercopy": "1.1.0",
30 | "grunt-contrib-concat": "0.1.3",
31 | "grunt-contrib-csslint": "0.2.0",
32 | "grunt-contrib-watch": "0.6.1",
33 | "grunt-contrib-jshint": "0.7.1",
34 | "grunt-contrib-uglify": "0.1.1",
35 | "grunt-html": "1.0.0",
36 | "grunt-jscs": "0.6.2",
37 | "load-grunt-tasks": "0.3.0"
38 | },
39 | "keywords": [
40 | "jquery",
41 | "jqueryui",
42 | "twitter",
43 | "bootstrap"
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/progressbar.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Progressbar Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of progressbar classes to Bootstrap
11 | $.extend( $.ui.progressbar.prototype.options.classes, {
12 | "ui-progressbar": "progress",
13 | "ui-progressbar-value": "progress-bar"
14 | });
15 |
16 | })(jQuery);
17 |
--------------------------------------------------------------------------------
/selectmenu.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Selectmenu Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | $.extend( $.ui.selectmenu.prototype.options.classes, {
11 | "ui-selectmenu-button": "btn btn-default dropdown-toggle",
12 | "ui-selectmenu-open": "open"
13 | });
14 |
15 | })(jQuery);
16 |
--------------------------------------------------------------------------------
/src/accordion.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Accordion Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of accordion classes to Bootstrap
11 | $.ui.accordion.prototype.options.classes[ "ui-accordion" ] = "panel panel-default";
12 | $.ui.accordion.prototype.options.classes[ "ui-accordion-content" ] = "panel-collapse collapse";
13 | $.ui.accordion.prototype.options.classes[ "ui-accordion-content-active" ] = "in";
14 | $.ui.accordion.prototype.options.classes[ "ui-accordion-header" ] = "panel-heading";
15 |
16 | })(jQuery);
17 |
--------------------------------------------------------------------------------
/src/button.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Button Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of button classes to Bootstrap
11 | $.ui.button.prototype.options.classes[ "ui-button" ] = "btn btn-default";
12 | $.ui.button.prototype.options.classes[ "ui-button-icon" ] = "glyphicon";
13 |
14 | })(jQuery);
15 |
--------------------------------------------------------------------------------
/src/dialog.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Dialog Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Converstion of dialog classes to Bootstrap
11 | $.ui.dialog.prototype.options.classes[ "ui-dialog" ] = "modal-content";
12 | $.ui.dialog.prototype.options.classes[ "ui-dialog-titlebar" ] = "modal-header";
13 | $.ui.dialog.prototype.options.classes[ "ui-dialog-title" ] = "modal-title";
14 | $.ui.dialog.prototype.options.classes[ "ui-dialog-titlebar-close" ] = "close";
15 | $.ui.dialog.prototype.options.classes[ "ui-dialog-content" ] = "modal-body";
16 | $.ui.dialog.prototype.options.classes[ "ui-dialog-buttonpane" ] = "modal-footer";
17 |
18 | })(jQuery);
19 |
--------------------------------------------------------------------------------
/src/menu.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Menu Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of menu classes to Bootstrap
11 | $.ui.menu.prototype.options.classes[ "ui-menu" ] = "list-group";
12 | $.ui.menu.prototype.options.classes[ "ui-menu-icons" ] = "";
13 | $.ui.menu.prototype.options.classes[ "ui-menu-icon" ] = "glyphicon glyphicon-chevron-right";
14 | $.ui.menu.prototype.options.classes[ "ui-menu-item" ] = "list-group-item";
15 | $.ui.menu.prototype.options.classes[ "ui-menu-divider" ] = "";
16 | $.ui.menu.prototype.options.classes[ "ui-menu-item-wrapper" ] = "";
17 |
18 | })(jQuery);
19 |
--------------------------------------------------------------------------------
/src/progressbar.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Progressbar Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of progressbar classes to Bootstrap
11 | $.ui.progressbar.prototype.options.classes[ "ui-progressbar" ] = "progress";
12 | $.ui.progressbar.prototype.options.classes[ "ui-progressbar-value" ] = "progress-bar";
13 |
14 | })(jQuery);
15 |
--------------------------------------------------------------------------------
/src/selectmenu.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Selectmenu Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | $.ui.selectmenu.prototype.options.classes[ "ui-selectmenu-button" ] = "btn btn-default dropdown-toggle";
11 | $.ui.selectmenu.prototype.options.classes[ "ui-selectmenu-open" ] = "open" ;
12 | $.ui.selectmenu.prototype.options.icons.button = "caret";
13 | $.ui.selectmenu.prototype.options.width = "auto";
14 |
15 | })(jQuery);
16 |
--------------------------------------------------------------------------------
/src/tabs.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Tabs Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of tabs classes to Bootstrap
11 | $.ui.tabs.prototype.options.classes[ "ui-tabs-nav" ] = "nav nav-tabs";
12 | $.ui.tabs.prototype.options.classes[ "ui-tabs-panel" ] = "tab-pane";
13 | $.ui.tabs.prototype.options.classes[ "ui-tabs-active" ] = "active";
14 |
15 | })(jQuery);
16 |
--------------------------------------------------------------------------------
/src/tooltip.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Tooltip Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of tooltip classes to Bootstrap
11 | $.ui.tooltip.prototype.options.classes[ "ui-tooltip" ] = "tooltip top fade in";
12 | $.ui.tooltip.prototype.options.classes[ "ui-tooltip-content" ] = "tooltip-inner";
13 |
14 | })(jQuery);
15 |
--------------------------------------------------------------------------------
/tabs.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Tabs Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of tabs classes to Bootstrap
11 | $.extend( $.ui.tabs.prototype.options.classes, {
12 | "ui-tabs-nav": "nav nav-tabs",
13 | "ui-tabs-panel": "tab-pane",
14 | "ui-tabs-active": "active"
15 | });
16 |
17 | })(jQuery);
18 |
--------------------------------------------------------------------------------
/tooltip.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Tooltip Bootstrap Adapter
3 | *
4 | *
5 | * Copyright 2014 Alexander Schmitz
6 | * Released under the MIT license.
7 | */
8 | (function( $, undefined ) {
9 |
10 | // Conversion of tooltip classes to Bootstrap
11 | $.extend( $.ui.tooltip.prototype.options.classes, {
12 | "ui-tooltip": "tooltip top fade in",
13 | "ui-tooltip-content": "tooltip-inner"
14 | });
15 |
16 | })(jQuery);
17 |
--------------------------------------------------------------------------------