Roo.bootstrap.version = (
function() {
var ret=3;
- Roo.each(document.styleSheets[0], function(s) {
+ Roo.each(document.styleSheets, function(s) {
if (s.href.match(/css-bootstrap4/)) {
ret=4;
}
});
return ret;
-})();/*
+})(); /*
* - LGPL
*
* base class for bootstrap elements.
}
if (!settings[size]) { // 0 = hidden
- cfg.cls += ' hidden-' + size;
+ cfg.cls += ' hidden-' + size + ' hidden' + size + '-down';;
return;
}
- cfg.cls += ' col-' + size + '-' + settings[size];
+ cfg.cls += ' col-' + size + '-' + settings[size] + (
+ size == 'xs' ? (' col-' + settings[size] ) : '' // bs4 col-{num} replaces col-xs
+ );
});
// i'm not actually sure these are really used - normally we add a navGroup to a navbar
- //if (Roo.bootstrap.version == 4) {
- // return cfg;
- //}
+ if (Roo.bootstrap.version == 4 && this.xtype == 'NavSimplebar') {
+ return cfg;
+ }
+
+
+
cfg.cn = [
{
- cls: 'nav',
+ cls: 'nav nav-' + this.xtype,
tag : 'ul'
}
];
c.html = '<i class="glyphicon"></i>' + c.html;
}
+ // could use BS4 hidden-..-down
+
if(typeof(config.lgHeader) != 'undefined'){
- hh += '<span class="hidden-xs hidden-sm hidden-md">' + config.lgHeader + '</span>';
+ hh += '<span class="hidden-xs hidden-sm hidden-md ">' + config.lgHeader + '</span>';
}
if(typeof(config.mdHeader) != 'undefined'){
if(typeof(config[size]) == 'undefined'){
return;
}
-
+
if (!config[size]) { // 0 = hidden
- c.cls += ' hidden-' + size;
+ // BS 4 '0' is treated as hide that column and below.
+ c.cls += ' hidden-' + size + ' hidden' + size + '-down';
return;
}
- c.cls += ' col-' + size + '-' + config[size];
-
+ c.cls += ' col-' + size + '-' + config[size] + (
+ size == 'xs' ? (' col-' + config[size] ) : '' // bs4 col-{num} replaces col-xs
+ );
+
+
});
header.cn.push(c)
return;
}
+
+
if (!config[size]) { // 0 = hidden
- td.cls += ' hidden-' + size;
+ // BS 4 '0' is treated as hide that column and below.
+ td.cls += ' hidden-' + size + ' hidden' + size + '-down';
return;
}
- td.cls += ' col-' + size + '-' + config[size];
+ td.cls += ' col-' + size + '-' + config[size] + (
+ size == 'xs' ? (' col-' + config[size] ) : '' // bs4 col-{num} replaces col-xs
+ );
+
});
if(!this.multiple && this.showToggleBtn){
var caret = {
- tag: 'span',
- cls: 'caret'
+ cls: 'caret'
};
if (this.caret != false) {
tag :'span',
cls : 'input-group-addon input-group-append input-group-text btn dropdown-toggle',
cn : [
- caret,
+ Roo.bootstrap.version == 3 ? caret : '',
{
tag: 'span',
cls: 'combobox-clear',
* @class Roo.bootstrap.HtmlEditorToolbar1
* Basic Toolbar
*
+ * @example
* Usage:
*
new Roo.bootstrap.HtmlEditor({
}
-});/*
- * - LGPL
- *
- * Alert
- *
- */
-
-/**
+});/**
* @class Roo.bootstrap.Alert
* @extends Roo.bootstrap.Component
- * Bootstrap Alert class
+ * Bootstrap Alert class - shows an alert area box
+ * eg
+ * <div class="alert alert-danger" role="alert"><span class="fa fa-exclamation-triangle"></span><span class="sr-only">Error:</span>
+ Enter a valid email address
+</div>
+ * @licence LGPL
* @cfg {String} title The title of alert
* @cfg {String} html The content of alert
* @cfg {String} weight ( success | info | warning | danger )
}
});/**
-* This script refer to:
-* Title: Signature Pad
-* Author: szimek
-* Availability: https://github.com/szimek/signature_pad
-**/
-
-/**
* @class Roo.bootstrap.BezierSignature
* @extends Roo.bootstrap.Component
* Bootstrap BezierSignature class
- *
+ * This script refer to:
+ * Title: Signature Pad
+ * Author: szimek
+ * Availability: https://github.com/szimek/signature_pad
+ *
* @constructor
* Create a new BezierSignature
* @param {Object} config The config object
});
};
-Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, {
-
+Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component,
+{
+
curve_data: [],
is_empty: true,
mouse_btn_down: true,
/**
- * @cfg(int) canvas height
+ * @cfg {int} canvas height
*/
canvas_height: '200px',
/**
- * @cfg(float or function) Radius of a single dot.
+ * @cfg {float|function} Radius of a single dot.
*/
dot_size: false,
/**
- * @cfg(float) Minimum width of a line. Defaults to 0.5.
+ * @cfg {float} Minimum width of a line. Defaults to 0.5.
*/
min_width: 0.5,
/**
- * @cfg(float) Maximum width of a line. Defaults to 2.5.
+ * @cfg {float} Maximum width of a line. Defaults to 2.5.
*/
max_width: 2.5,
/**
- * @cfg(integer) Draw the next point at most once per every x milliseconds. Set it to 0 to turn off throttling. Defaults to 16.
+ * @cfg {integer} Draw the next point at most once per every x milliseconds. Set it to 0 to turn off throttling. Defaults to 16.
*/
throttle: 16,
/**
- * @cfg(integer) Add the next point only if the previous one is farther than x pixels. Defaults to 5.
+ * @cfg {integer} Add the next point only if the previous one is farther than x pixels. Defaults to 5.
*/
min_distance: 5,
/**
- * @cfg(string) Color used to clear the background. Can be any color format accepted by context.fillStyle. Defaults to "rgba(0,0,0,0)" (transparent black). Use a non-transparent color e.g. "rgb(255,255,255)" (opaque white) if you'd like to save signatures as JPEG images.
+ * @cfg {string} Color used to clear the background. Can be any color format accepted by context.fillStyle. Defaults to "rgba(0,0,0,0)" (transparent black). Use a non-transparent color e.g. "rgb(255,255,255)" (opaque white) if you'd like to save signatures as JPEG images.
*/
bg_color: 'rgba(0, 0, 0, 0)',
/**
- * @cfg(string) Color used to draw the lines. Can be any color format accepted by context.fillStyle. Defaults to "black".
+ * @cfg {string} Color used to draw the lines. Can be any color format accepted by context.fillStyle. Defaults to "black".
*/
dot_color: 'black',
/**
- * @cfg(float) Weight used to modify new velocity based on the previous velocity. Defaults to 0.7.
- */
+ * @cfg {float} Weight used to modify new velocity based on the previous velocity. Defaults to 0.7.
+ */
velocity_filter_weight: 0.7,
/**
- * @cfg(function) Callback when stroke begin.
+ * @cfg {function} Callback when stroke begin.
*/
onBegin: false,
/**
- * @cfg(function) Callback when stroke end.
+ * @cfg {function} Callback when stroke end.
*/
onEnd: false,
this.strokeUpdate(e);
if (this.throttle) {
- this.throttle(this.strokeUpdate, this.throttle);
+ this.throttleStroke(this.strokeUpdate, this.throttle);
}
else {
this.strokeUpdate(e);
return Bezier;
}()),
- throttle: function(fn, wait) {
+ throttleStroke: function(fn, wait) {
if (wait === void 0) { wait = 250; }
var previous = 0;
var timeout = null;