Merge branch 'dev'
@ -2,6 +2,25 @@ X-editable changelog
|
||||
=============================
|
||||
|
||||
|
||||
Version 1.4.4 May 4, 2013
|
||||
----------------------------
|
||||
[enh #219] added `error` callback (joekaiser)
|
||||
[enh #198] new value of showbuttons: 'bottom' (vitalets)
|
||||
[enh #192] add class editable-popup to have diferent css for popup and inline (vitalets)
|
||||
[enh] update to bootstrap-datepicker 1.0.2 (vitalets)
|
||||
[enh] update to combodate 1.0.3 with yearDescending and roundTime options (vitalets)
|
||||
[enh] add 'use strict' directive (vitalets)
|
||||
[enh #202] allow pk=0 (mdeweerd)
|
||||
[enh #183] move datepicker icon to center of button (vitalets)
|
||||
[enh] upgrade to select2 3.3.2 (vitalets)
|
||||
[enh #176] update to bootstrap 2.3.1 (vitalets)
|
||||
[bug #171] clear in date & datetime when showbuttons=false (vitalets)
|
||||
[bug #166] clear button for input type=number (vitalets)
|
||||
[bug #65] checklist don't show checked for single value (vitalets)
|
||||
[enh #188] added bootstrap datetime (adeg, vitalets)
|
||||
[bug] editable-poshytip on inline mode tries to write in $.Poshytip (vitalets)
|
||||
|
||||
|
||||
Version 1.4.3 Mar 8, 2013
|
||||
----------------------------
|
||||
[bug #32] hotfix for jQuery UI 1.9+ (vitalets)
|
||||
|
@ -2,14 +2,14 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>x-editable</id>
|
||||
<version>1.4.3</version>
|
||||
<version>1.4.4</version>
|
||||
<authors>Vitaliy Potapov</authors>
|
||||
<owners>Vitaliy Potapov</owners>
|
||||
<licenseUrl>https://github.com/vitalets/x-editable/blob/master/LICENSE-MIT</licenseUrl>
|
||||
<projectUrl>http://vitalets.github.com/x-editable</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery</description>
|
||||
<releaseNotes>hotfix for jQuery UI 1.9+.</releaseNotes>
|
||||
<releaseNotes>Bootstrap datetimepicker and more</releaseNotes>
|
||||
<copyright>Copyright 2012-2013</copyright>
|
||||
<tags>edit-in-place editable bootstrap jquery</tags>
|
||||
<dependencies>
|
||||
|
20
grunt.js
@ -15,9 +15,17 @@ function getFiles() {
|
||||
inputs+'date/date.js',
|
||||
inputs+'date/datefield.js',
|
||||
inputs+'date/bootstrap-datepicker/js/bootstrap-datepicker.js',
|
||||
inputs+'datetime/datetime.js',
|
||||
inputs+'datetime/datetimefield.js',
|
||||
//don't build datetime lib, should be included manually
|
||||
//inputs+'datetime/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js',
|
||||
inputs+'typeahead.js'
|
||||
],
|
||||
css: [inputs+'date/bootstrap-datepicker/css/datepicker.css']
|
||||
css: [
|
||||
inputs+'date/bootstrap-datepicker/css/datepicker.css'
|
||||
//don't build datetime lib, should be included manually
|
||||
//inputs+'datetime/bootstrap-datetimepicker/css/datetimepicker.css'
|
||||
]
|
||||
},
|
||||
jqueryui: {
|
||||
form: [forms+'editable-form-jqueryui.js'],
|
||||
@ -98,8 +106,11 @@ function getFiles() {
|
||||
/*global module:false*/
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib');
|
||||
grunt.loadNpmTasks('grunt-contrib');
|
||||
|
||||
//version of jquery-ui datepicker to be copied into dist
|
||||
var dp_ui_ver = '1.10.2';
|
||||
|
||||
//module for testing
|
||||
var module = '';
|
||||
// module = '&module=textarea';
|
||||
@ -165,6 +176,7 @@ module.exports = function(grunt) {
|
||||
'src/inputs/*.js',
|
||||
'src/inputs/date/*.js',
|
||||
'src/inputs/dateui/*.js',
|
||||
'src/inputs/datetime/*.js',
|
||||
'src/inputs/combodate/*.js',
|
||||
'src/inputs/select2/*.js',
|
||||
|
||||
@ -221,7 +233,9 @@ module.exports = function(grunt) {
|
||||
ui_datepicker: {
|
||||
files: {
|
||||
//copy jquery ui datepicker
|
||||
'<%= dist %>/jquery-editable/jquery-ui-datepicker/' : 'src/inputs/dateui/jquery-ui-datepicker/**'
|
||||
'<%= dist %>/jquery-editable/jquery-ui-datepicker/js/': 'src/inputs/dateui/jquery-ui-datepicker/js/jquery-ui-'+dp_ui_ver+'.*.js',
|
||||
'<%= dist %>/jquery-editable/jquery-ui-datepicker/css/redmond/': 'src/inputs/dateui/jquery-ui-datepicker/css/redmond/jquery-ui-'+dp_ui_ver+'.*.css',
|
||||
'<%= dist %>/jquery-editable/jquery-ui-datepicker/css/redmond/images/': 'src/inputs/dateui/jquery-ui-datepicker/css/redmond/images/**'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "X-editable",
|
||||
"title": "X-editable",
|
||||
"description": "In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery",
|
||||
"version": "1.4.3",
|
||||
"version": "1.4.4",
|
||||
"homepage": "http://github.com/vitalets/x-editable",
|
||||
"author": {
|
||||
"name": "Vitaliy Potapov",
|
||||
|
@ -1,9 +1,8 @@
|
||||
.editable-container {
|
||||
.editable-container.editable-popup {
|
||||
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
|
||||
}
|
||||
|
||||
.editable-container.popover {
|
||||
/* width: 300px;*/ /* debug */
|
||||
width: auto; /* without this rule popover does not stretch */
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ Applied as jQuery method.
|
||||
@uses editableform
|
||||
**/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Popup = function (element, options) {
|
||||
this.init(element, options);
|
||||
@ -21,6 +22,7 @@ Applied as jQuery method.
|
||||
Popup.prototype = {
|
||||
containerName: null, //tbd in child class
|
||||
innerCss: null, //tbd in child class
|
||||
containerClass: 'editable-container editable-popup', //css class applied to container element
|
||||
init: function(element, options) {
|
||||
this.$element = $(element);
|
||||
//since 1.4.1 container do not use data-* directly as they already merged into options.
|
||||
@ -53,9 +55,23 @@ Applied as jQuery method.
|
||||
var $target = $(e.target), i,
|
||||
exclude_classes = ['.editable-container',
|
||||
'.ui-datepicker-header',
|
||||
'.datepicker', //in inline mode datepicker is rendered into body
|
||||
'.modal-backdrop',
|
||||
'.bootstrap-wysihtml5-insert-image-modal',
|
||||
'.bootstrap-wysihtml5-insert-link-modal'];
|
||||
'.bootstrap-wysihtml5-insert-link-modal'
|
||||
];
|
||||
|
||||
//check if element is detached. It occurs when clicking in bootstrap datepicker
|
||||
if (!$.contains(document.documentElement, e.target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//for some reason FF 20 generates extra event (click) in select2 widget with e.target = document
|
||||
//we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199
|
||||
//Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec
|
||||
if($target.is(document)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//if click inside one of exclude classes --> no nothing
|
||||
for(i=0; i<exclude_classes.length; i++) {
|
||||
@ -76,6 +92,11 @@ Applied as jQuery method.
|
||||
splitOptions: function() {
|
||||
this.containerOptions = {};
|
||||
this.formOptions = {};
|
||||
|
||||
if(!$.fn[this.containerName]) {
|
||||
throw new Error(this.containerName + ' not found. Have you included corresponding js file?');
|
||||
}
|
||||
|
||||
var cDef = $.fn[this.containerName].defaults;
|
||||
//keys defined in container defaults go to container, others go to form
|
||||
for(var k in this.options) {
|
||||
@ -100,6 +121,7 @@ Applied as jQuery method.
|
||||
return this.$element.data(this.containerDataName || this.containerName);
|
||||
},
|
||||
|
||||
/* call native method of underlying container, e.g. this.$element.popover('method') */
|
||||
call: function() {
|
||||
this.$element[this.containerName].apply(this.$element, arguments);
|
||||
},
|
||||
@ -120,17 +142,21 @@ Applied as jQuery method.
|
||||
resize: $.proxy(this.setPosition, this), //this allows to re-position container when form size is changed
|
||||
rendered: $.proxy(function(){
|
||||
/**
|
||||
Fired when container is shown and form is rendered (for select will wait for loading dropdown options)
|
||||
Fired when container is shown and form is rendered (for select will wait for loading dropdown options).
|
||||
**Note:** Bootstrap popover has own `shown` event that now cannot be separated from x-editable's one.
|
||||
The workaround is to check `arguments.length` that is always `2` for x-editable.
|
||||
|
||||
@event shown
|
||||
@param {Object} event event object
|
||||
@example
|
||||
$('#username').on('shown', function() {
|
||||
var editable = $(this).data('editable');
|
||||
$('#username').on('shown', function(e, editable) {
|
||||
editable.input.$input.val('overwriting value of input..');
|
||||
});
|
||||
**/
|
||||
this.$element.triggerHandler('shown');
|
||||
/*
|
||||
TODO: added second param mainly to distinguish from bootstrap's shown event. It's a hotfix that will be solved in future versions via namespaced events.
|
||||
*/
|
||||
this.$element.triggerHandler('shown', this);
|
||||
}, this)
|
||||
})
|
||||
.editableform('render');
|
||||
@ -151,7 +177,7 @@ Applied as jQuery method.
|
||||
|
||||
//show container itself
|
||||
this.innerShow();
|
||||
this.tip().addClass('editable-container');
|
||||
this.tip().addClass(this.containerClass);
|
||||
|
||||
/*
|
||||
Currently, form is re-rendered on every show.
|
||||
@ -196,11 +222,13 @@ Applied as jQuery method.
|
||||
this.innerHide();
|
||||
|
||||
/**
|
||||
Fired when container was hidden. It occurs on both save or cancel.
|
||||
Fired when container was hidden. It occurs on both save or cancel.
|
||||
**Note:** Bootstrap popover has own `hidden` event that now cannot be separated from x-editable's one.
|
||||
The workaround is to check `arguments.length` that is always `2` for x-editable.
|
||||
|
||||
@event hidden
|
||||
@param {object} event event object
|
||||
@param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|undefined (=manual)</code>
|
||||
@param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|manual</code>
|
||||
@example
|
||||
$('#username').on('hidden', function(e, reason) {
|
||||
if(reason === 'save' || reason === 'cancel') {
|
||||
@ -209,7 +237,7 @@ Applied as jQuery method.
|
||||
}
|
||||
});
|
||||
**/
|
||||
this.$element.triggerHandler('hidden', reason);
|
||||
this.$element.triggerHandler('hidden', reason || 'manual');
|
||||
},
|
||||
|
||||
/* internal show method. To be overwritten in child classes */
|
||||
|
@ -3,16 +3,18 @@
|
||||
* ---------------------
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
//copy prototype from EditableContainer
|
||||
//extend methods
|
||||
$.extend($.fn.editableContainer.Inline.prototype, $.fn.editableContainer.Popup.prototype, {
|
||||
containerName: 'editableform',
|
||||
innerCss: '.editable-inline',
|
||||
containerClass: 'editable-container editable-inline', //css class applied to container element
|
||||
|
||||
initContainer: function(){
|
||||
//container is <span> element
|
||||
this.$tip = $('<span></span>').addClass('editable-inline');
|
||||
this.$tip = $('<span></span>');
|
||||
|
||||
//convert anim to miliseconds (int)
|
||||
if(!this.options.anim) {
|
||||
|
@ -4,12 +4,13 @@
|
||||
* requires bootstrap-popover.js
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
//extend methods
|
||||
$.extend($.fn.editableContainer.Popup.prototype, {
|
||||
containerName: 'popover',
|
||||
//for compatibility with bootstrap <= 2.2.1 (content inserted into <p> instead of directly .popover-content)
|
||||
innerCss: $($.fn.popover.defaults.template).find('p').length ? '.popover-content p' : '.popover-content',
|
||||
innerCss: $.fn.popover && $($.fn.popover.defaults.template).find('p').length ? '.popover-content p' : '.popover-content',
|
||||
|
||||
initContainer: function(){
|
||||
$.extend(this.containerOptions, {
|
||||
|
@ -4,6 +4,7 @@
|
||||
* requires jquery.poshytip.js
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
//extend methods
|
||||
$.extend($.fn.editableContainer.Popup.prototype, {
|
||||
@ -105,99 +106,101 @@
|
||||
* see https://github.com/vadikom/poshytip/issues/7
|
||||
*/
|
||||
/*jshint eqeqeq:false, curly: false*/
|
||||
var tips = [],
|
||||
reBgImage = /^url\(["']?([^"'\)]*)["']?\);?$/i,
|
||||
rePNG = /\.png$/i,
|
||||
ie6 = !!window.createPopup && document.documentElement.currentStyle.minWidth == 'undefined';
|
||||
|
||||
$.Poshytip.prototype.refresh = function(async) {
|
||||
if (this.disabled)
|
||||
return;
|
||||
|
||||
var currPos;
|
||||
if (async) {
|
||||
if (!this.$tip.data('active'))
|
||||
return;
|
||||
// save current position as we will need to animate
|
||||
currPos = {left: this.$tip.css('left'), top: this.$tip.css('top')};
|
||||
}
|
||||
if($.Poshytip) { //need this check, because in inline mode poshytip may not be loaded!
|
||||
var tips = [],
|
||||
reBgImage = /^url\(["']?([^"'\)]*)["']?\);?$/i,
|
||||
rePNG = /\.png$/i,
|
||||
ie6 = !!window.createPopup && document.documentElement.currentStyle.minWidth == 'undefined';
|
||||
|
||||
$.Poshytip.prototype.refresh = function(async) {
|
||||
if (this.disabled)
|
||||
return;
|
||||
|
||||
var currPos;
|
||||
if (async) {
|
||||
if (!this.$tip.data('active'))
|
||||
return;
|
||||
// save current position as we will need to animate
|
||||
currPos = {left: this.$tip.css('left'), top: this.$tip.css('top')};
|
||||
}
|
||||
|
||||
// reset position to avoid text wrapping, etc.
|
||||
this.$tip.css({left: 0, top: 0}).appendTo(document.body);
|
||||
// reset position to avoid text wrapping, etc.
|
||||
this.$tip.css({left: 0, top: 0}).appendTo(document.body);
|
||||
|
||||
// save default opacity
|
||||
if (this.opacity === undefined)
|
||||
this.opacity = this.$tip.css('opacity');
|
||||
// save default opacity
|
||||
if (this.opacity === undefined)
|
||||
this.opacity = this.$tip.css('opacity');
|
||||
|
||||
// check for images - this code is here (i.e. executed each time we show the tip and not on init) due to some browser inconsistencies
|
||||
var bgImage = this.$tip.css('background-image').match(reBgImage),
|
||||
arrow = this.$arrow.css('background-image').match(reBgImage);
|
||||
// check for images - this code is here (i.e. executed each time we show the tip and not on init) due to some browser inconsistencies
|
||||
var bgImage = this.$tip.css('background-image').match(reBgImage),
|
||||
arrow = this.$arrow.css('background-image').match(reBgImage);
|
||||
|
||||
if (bgImage) {
|
||||
var bgImagePNG = rePNG.test(bgImage[1]);
|
||||
// fallback to background-color/padding/border in IE6 if a PNG is used
|
||||
if (ie6 && bgImagePNG) {
|
||||
this.$tip.css('background-image', 'none');
|
||||
this.$inner.css({margin: 0, border: 0, padding: 0});
|
||||
bgImage = bgImagePNG = false;
|
||||
} else {
|
||||
this.$tip.prepend('<table class="fallback" border="0" cellpadding="0" cellspacing="0"><tr><td class="tip-top tip-bg-image" colspan="2"><span></span></td><td class="tip-right tip-bg-image" rowspan="2"><span></span></td></tr><tr><td class="tip-left tip-bg-image" rowspan="2"><span></span></td><td></td></tr><tr><td class="tip-bottom tip-bg-image" colspan="2"><span></span></td></tr></table>')
|
||||
.css({border: 0, padding: 0, 'background-image': 'none', 'background-color': 'transparent'})
|
||||
.find('.tip-bg-image').css('background-image', 'url("' + bgImage[1] +'")').end()
|
||||
.find('td').eq(3).append(this.$inner);
|
||||
}
|
||||
// disable fade effect in IE due to Alpha filter + translucent PNG issue
|
||||
if (bgImagePNG && !$.support.opacity)
|
||||
this.opts.fade = false;
|
||||
}
|
||||
// IE arrow fixes
|
||||
if (arrow && !$.support.opacity) {
|
||||
// disable arrow in IE6 if using a PNG
|
||||
if (ie6 && rePNG.test(arrow[1])) {
|
||||
arrow = false;
|
||||
this.$arrow.css('background-image', 'none');
|
||||
}
|
||||
// disable fade effect in IE due to Alpha filter + translucent PNG issue
|
||||
this.opts.fade = false;
|
||||
}
|
||||
if (bgImage) {
|
||||
var bgImagePNG = rePNG.test(bgImage[1]);
|
||||
// fallback to background-color/padding/border in IE6 if a PNG is used
|
||||
if (ie6 && bgImagePNG) {
|
||||
this.$tip.css('background-image', 'none');
|
||||
this.$inner.css({margin: 0, border: 0, padding: 0});
|
||||
bgImage = bgImagePNG = false;
|
||||
} else {
|
||||
this.$tip.prepend('<table class="fallback" border="0" cellpadding="0" cellspacing="0"><tr><td class="tip-top tip-bg-image" colspan="2"><span></span></td><td class="tip-right tip-bg-image" rowspan="2"><span></span></td></tr><tr><td class="tip-left tip-bg-image" rowspan="2"><span></span></td><td></td></tr><tr><td class="tip-bottom tip-bg-image" colspan="2"><span></span></td></tr></table>')
|
||||
.css({border: 0, padding: 0, 'background-image': 'none', 'background-color': 'transparent'})
|
||||
.find('.tip-bg-image').css('background-image', 'url("' + bgImage[1] +'")').end()
|
||||
.find('td').eq(3).append(this.$inner);
|
||||
}
|
||||
// disable fade effect in IE due to Alpha filter + translucent PNG issue
|
||||
if (bgImagePNG && !$.support.opacity)
|
||||
this.opts.fade = false;
|
||||
}
|
||||
// IE arrow fixes
|
||||
if (arrow && !$.support.opacity) {
|
||||
// disable arrow in IE6 if using a PNG
|
||||
if (ie6 && rePNG.test(arrow[1])) {
|
||||
arrow = false;
|
||||
this.$arrow.css('background-image', 'none');
|
||||
}
|
||||
// disable fade effect in IE due to Alpha filter + translucent PNG issue
|
||||
this.opts.fade = false;
|
||||
}
|
||||
|
||||
var $table = this.$tip.find('table.fallback');
|
||||
if (ie6) {
|
||||
// fix min/max-width in IE6
|
||||
this.$tip[0].style.width = '';
|
||||
$table.width('auto').find('td').eq(3).width('auto');
|
||||
var tipW = this.$tip.width(),
|
||||
minW = parseInt(this.$tip.css('min-width'), 10),
|
||||
maxW = parseInt(this.$tip.css('max-width'), 10);
|
||||
if (!isNaN(minW) && tipW < minW)
|
||||
tipW = minW;
|
||||
else if (!isNaN(maxW) && tipW > maxW)
|
||||
tipW = maxW;
|
||||
this.$tip.add($table).width(tipW).eq(0).find('td').eq(3).width('100%');
|
||||
} else if ($table[0]) {
|
||||
// fix the table width if we are using a background image
|
||||
// IE9, FF4 use float numbers for width/height so use getComputedStyle for them to avoid text wrapping
|
||||
// for details look at: http://vadikom.com/dailies/offsetwidth-offsetheight-useless-in-ie9-firefox4/
|
||||
$table.width('auto').find('td').eq(3).width('auto').end().end().width(document.defaultView && document.defaultView.getComputedStyle && parseFloat(document.defaultView.getComputedStyle(this.$tip[0], null).width) || this.$tip.width()).find('td').eq(3).width('100%');
|
||||
}
|
||||
this.tipOuterW = this.$tip.outerWidth();
|
||||
this.tipOuterH = this.$tip.outerHeight();
|
||||
var $table = this.$tip.find('table.fallback');
|
||||
if (ie6) {
|
||||
// fix min/max-width in IE6
|
||||
this.$tip[0].style.width = '';
|
||||
$table.width('auto').find('td').eq(3).width('auto');
|
||||
var tipW = this.$tip.width(),
|
||||
minW = parseInt(this.$tip.css('min-width'), 10),
|
||||
maxW = parseInt(this.$tip.css('max-width'), 10);
|
||||
if (!isNaN(minW) && tipW < minW)
|
||||
tipW = minW;
|
||||
else if (!isNaN(maxW) && tipW > maxW)
|
||||
tipW = maxW;
|
||||
this.$tip.add($table).width(tipW).eq(0).find('td').eq(3).width('100%');
|
||||
} else if ($table[0]) {
|
||||
// fix the table width if we are using a background image
|
||||
// IE9, FF4 use float numbers for width/height so use getComputedStyle for them to avoid text wrapping
|
||||
// for details look at: http://vadikom.com/dailies/offsetwidth-offsetheight-useless-in-ie9-firefox4/
|
||||
$table.width('auto').find('td').eq(3).width('auto').end().end().width(document.defaultView && document.defaultView.getComputedStyle && parseFloat(document.defaultView.getComputedStyle(this.$tip[0], null).width) || this.$tip.width()).find('td').eq(3).width('100%');
|
||||
}
|
||||
this.tipOuterW = this.$tip.outerWidth();
|
||||
this.tipOuterH = this.$tip.outerHeight();
|
||||
|
||||
this.calcPos();
|
||||
this.calcPos();
|
||||
|
||||
// position and show the arrow image
|
||||
if (arrow && this.pos.arrow) {
|
||||
this.$arrow[0].className = 'tip-arrow tip-arrow-' + this.pos.arrow;
|
||||
this.$arrow.css('visibility', 'inherit');
|
||||
}
|
||||
// position and show the arrow image
|
||||
if (arrow && this.pos.arrow) {
|
||||
this.$arrow[0].className = 'tip-arrow tip-arrow-' + this.pos.arrow;
|
||||
this.$arrow.css('visibility', 'inherit');
|
||||
}
|
||||
|
||||
if (async) {
|
||||
this.asyncAnimating = true;
|
||||
var self = this;
|
||||
this.$tip.css(currPos).animate({left: this.pos.l, top: this.pos.t}, 200, function() { self.asyncAnimating = false; });
|
||||
} else {
|
||||
this.$tip.css({left: this.pos.l, top: this.pos.t});
|
||||
}
|
||||
};
|
||||
if (async) {
|
||||
this.asyncAnimating = true;
|
||||
var self = this;
|
||||
this.$tip.css(currPos).animate({left: this.pos.l, top: this.pos.t}, 200, function() { self.asyncAnimating = false; });
|
||||
} else {
|
||||
this.$tip.css({left: this.pos.l, top: this.pos.t});
|
||||
}
|
||||
};
|
||||
}
|
||||
/*jshinteqeqeq: true, curly: true*/
|
||||
}(window.jQuery));
|
@ -4,7 +4,8 @@
|
||||
* requires jquery ui 1.9.x
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
//extend methods
|
||||
$.extend($.fn.editableContainer.Popup.prototype, {
|
||||
containerName: 'tooltip', //jQuery method, aplying the widget
|
||||
@ -105,4 +106,4 @@
|
||||
|
||||
});
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
|
@ -2,8 +2,9 @@
|
||||
Editableform based on Twitter Bootstrap
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.editableform.Constructor.prototype, {
|
||||
$.extend($.fn.editableform.Constructor.prototype, {
|
||||
initTemplate: function() {
|
||||
this.$form = $($.fn.editableform.template);
|
||||
this.$form.find('.editable-error-block').addClass('help-block');
|
||||
|
@ -2,10 +2,16 @@
|
||||
Editableform based on jQuery UI
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.editableform.Constructor.prototype, {
|
||||
initButtons: function() {
|
||||
this.$form.find('.editable-buttons').append($.fn.editableform.buttons);
|
||||
var $btn = this.$form.find('.editable-buttons');
|
||||
$btn.append($.fn.editableform.buttons);
|
||||
if(this.options.showbuttons === 'bottom') {
|
||||
$btn.addClass('editable-buttons-bottom');
|
||||
}
|
||||
|
||||
this.$form.find('.editable-submit').button({
|
||||
icons: { primary: "ui-icon-check" },
|
||||
text: false
|
||||
|
@ -2,6 +2,8 @@
|
||||
* EditableForm utilites
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
//utils
|
||||
$.fn.editableutils = {
|
||||
/**
|
||||
@ -195,6 +197,11 @@
|
||||
type = 'combodate';
|
||||
}
|
||||
}
|
||||
|
||||
//`datetime` should be datetimefield in 'inline' mode
|
||||
if(type === 'datetime' && options.mode === 'inline') {
|
||||
type = 'datetimefield';
|
||||
}
|
||||
|
||||
//change wysihtml5 to textarea for jquery UI and plain versions
|
||||
if(type === 'wysihtml5' && !$.fn.editabletypes[type]) {
|
||||
|
@ -17,7 +17,11 @@
|
||||
*display: inline;
|
||||
}
|
||||
|
||||
|
||||
.editable-buttons.editable-buttons-bottom {
|
||||
display: block;
|
||||
margin-top: 7px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.editable-input {
|
||||
vertical-align: top;
|
||||
@ -66,12 +70,20 @@
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* ---- For specific types ---- */
|
||||
|
||||
.editableform .editable-date {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
|
||||
.editable-inline .add-on .icon-th {
|
||||
margin-top: 3px;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
|
||||
/* checklist vertical alignment */
|
||||
.editable-checklist label input[type="checkbox"],
|
||||
@ -107,7 +119,11 @@
|
||||
position: absolute;
|
||||
opacity: 0.6;
|
||||
z-index: 100;
|
||||
|
||||
|
||||
top: 50%;
|
||||
right: 5px;
|
||||
margin-top: -7px;
|
||||
|
||||
}
|
||||
|
||||
.editable-clear-x:hover {
|
||||
|
@ -8,7 +8,8 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
@uses textarea
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var EditableForm = function (div, options) {
|
||||
this.options = $.extend({}, $.fn.editableform.defaults, options);
|
||||
this.$div = $(div); //div, containing form. Not form tag. Not editable-element.
|
||||
@ -32,7 +33,11 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
this.$form = $($.fn.editableform.template);
|
||||
},
|
||||
initButtons: function() {
|
||||
this.$form.find('.editable-buttons').append($.fn.editableform.buttons);
|
||||
var $btn = this.$form.find('.editable-buttons');
|
||||
$btn.append($.fn.editableform.buttons);
|
||||
if(this.options.showbuttons === 'bottom') {
|
||||
$btn.addClass('editable-buttons-bottom');
|
||||
}
|
||||
},
|
||||
/**
|
||||
Renders editableform
|
||||
@ -252,8 +257,15 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
this.$div.triggerHandler('save', {newValue: newValue, response: response});
|
||||
}, this))
|
||||
.fail($.proxy(function(xhr) {
|
||||
this.error(typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!');
|
||||
this.showForm();
|
||||
var msg;
|
||||
if(typeof this.options.error === 'function') {
|
||||
msg = this.options.error.call(this.options.scope, xhr, newValue);
|
||||
} else {
|
||||
msg = typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!';
|
||||
}
|
||||
|
||||
this.error(msg);
|
||||
this.showForm();
|
||||
}, this));
|
||||
},
|
||||
|
||||
@ -265,7 +277,7 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
this.options.pk = $.fn.editableutils.tryParseJson(this.options.pk, true);
|
||||
|
||||
var pk = (typeof this.options.pk === 'function') ? this.options.pk.call(this.options.scope) : this.options.pk,
|
||||
send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk)))),
|
||||
send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk !== null && pk !== undefined)))),
|
||||
params;
|
||||
|
||||
if (send) { //send to server
|
||||
@ -473,7 +485,7 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
validate: null,
|
||||
/**
|
||||
Success callback. Called when value successfully sent on server and **response status = 200**.
|
||||
Useful to work with json response. For example, if your backend response can be <code>{success: true}</code>
|
||||
Usefull to work with json response. For example, if your backend response can be <code>{success: true}</code>
|
||||
or <code>{success: false, msg: "server error"}</code> you can check it inside this callback.
|
||||
If it returns **string** - means error occured and string is shown as error message.
|
||||
If it returns **object like** <code>{newValue: <something>}</code> - it overwrites value, submitted by user.
|
||||
@ -489,6 +501,25 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
**/
|
||||
success: null,
|
||||
/**
|
||||
Error callback. Called when request failed (response status != 200).
|
||||
Usefull when you want to parse error response and display a custom message.
|
||||
Must return **string** - the message to be displayed in the error block.
|
||||
|
||||
@property error
|
||||
@type function
|
||||
@default null
|
||||
@since 1.4.4
|
||||
@example
|
||||
error: function(response, newValue) {
|
||||
if(response.status === 500) {
|
||||
return 'Service unavailable. Please try later.';
|
||||
} else {
|
||||
return response.responseText;
|
||||
}
|
||||
}
|
||||
**/
|
||||
error: null,
|
||||
/**
|
||||
Additional options for submit ajax request.
|
||||
List of values: http://api.jquery.com/jQuery.ajax
|
||||
|
||||
@ -504,11 +535,11 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
**/
|
||||
ajaxOptions: null,
|
||||
/**
|
||||
Whether to show buttons or not.
|
||||
Where to show buttons: left(true)|bottom|false
|
||||
Form without buttons is auto-submitted.
|
||||
|
||||
@property showbuttons
|
||||
@type boolean
|
||||
@type boolean|string
|
||||
@default true
|
||||
@since 1.1.1
|
||||
**/
|
||||
@ -532,7 +563,7 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
@default false
|
||||
@since 1.2.0
|
||||
**/
|
||||
savenochange: false
|
||||
savenochange: false
|
||||
};
|
||||
|
||||
/*
|
||||
@ -558,4 +589,4 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
|
||||
//error class attached to editable-error-block
|
||||
$.fn.editableform.errorBlockClass = 'editable-error';
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
|
@ -13,10 +13,10 @@ a.editable-click.editable-disabled:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.editable-empty, .editable-empty:hover{
|
||||
.editable-empty, .editable-empty:hover, .editable-empty:focus{
|
||||
font-style: italic;
|
||||
color: #DD1144;
|
||||
border-bottom: none;
|
||||
/* border-bottom: none; */
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
@uses editableContainer
|
||||
**/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Editable = function (element, options) {
|
||||
this.$element = $(element);
|
||||
@ -99,7 +100,8 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
this.enable();
|
||||
}
|
||||
/**
|
||||
Fired when element was initialized by editable method.
|
||||
Fired when element was initialized by `$().editable()` method.
|
||||
Please note that you should setup `init` handler **before** applying `editable`.
|
||||
|
||||
@event init
|
||||
@param {Object} event event object
|
||||
@ -109,6 +111,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
$('#username').on('init', function(e, editable) {
|
||||
alert('initialized ' + editable.options.name);
|
||||
});
|
||||
$('#username').editable();
|
||||
**/
|
||||
this.$element.triggerHandler('init', this);
|
||||
}, this));
|
||||
@ -415,6 +418,8 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
@method destroy()
|
||||
**/
|
||||
destroy: function() {
|
||||
this.disable();
|
||||
|
||||
if(this.container) {
|
||||
this.container.destroy();
|
||||
}
|
||||
@ -426,8 +431,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
|
||||
this.$element.off("save.internal");
|
||||
|
||||
this.$element.removeClass('editable');
|
||||
this.$element.removeClass('editable-open');
|
||||
this.$element.removeClass('editable editable-open editable-disabled');
|
||||
this.$element.removeData('editable');
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Address = function (options) {
|
||||
this.init('address', options, Address.defaults);
|
||||
};
|
||||
|
@ -25,7 +25,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Wysihtml5 = function (options) {
|
||||
this.init('wysihtml5', options, Wysihtml5.defaults);
|
||||
|
||||
|
@ -6,7 +6,8 @@ To create your own input you can inherit from this class.
|
||||
@class abstractinput
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
//types
|
||||
$.fn.editabletypes = {};
|
||||
|
||||
@ -189,7 +190,10 @@ To create your own input you can inherit from this class.
|
||||
inputclass: 'input-medium',
|
||||
//scope for external methods (e.g. source defined as function)
|
||||
//for internal use only
|
||||
scope: null
|
||||
scope: null,
|
||||
|
||||
//need to re-declare showbuttons here to get it's value from common config (passed only options existing in defaults)
|
||||
showbuttons: true
|
||||
};
|
||||
|
||||
$.extend($.fn.editabletypes, {abstractinput: AbstractInput});
|
||||
|
@ -21,7 +21,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Checklist = function (options) {
|
||||
this.init('checklist', options, Checklist.defaults);
|
||||
};
|
||||
@ -64,6 +65,8 @@ $(function(){
|
||||
value = str.split(reg);
|
||||
} else if($.isArray(str)) {
|
||||
value = str;
|
||||
} else {
|
||||
value = [str];
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
@ -39,7 +39,8 @@ $(function(){
|
||||
/*global moment*/
|
||||
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Constructor = function (options) {
|
||||
this.init('combodate', options, Constructor.defaults);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Combodate - 1.0.2
|
||||
* Combodate - 1.0.3
|
||||
* Dropdown date and time picker.
|
||||
* Converts text input into dropdowns to pick day, month, year, hour, minute and second.
|
||||
* Uses momentjs as datetime library http://momentjs.com.
|
||||
@ -106,7 +106,7 @@
|
||||
relTime;
|
||||
|
||||
if(this.options.firstItem === 'name') {
|
||||
//need both to suuport moment ver < 2 and >= 2
|
||||
//need both to support moment ver < 2 and >= 2
|
||||
relTime = moment.relativeTime || moment.langData()._relativeTime;
|
||||
var header = typeof relTime[key] === 'function' ? relTime[key](1, true, key, false) : relTime[key];
|
||||
//take last entry (see momentjs lang files structure)
|
||||
@ -171,13 +171,16 @@
|
||||
fill year
|
||||
*/
|
||||
fillYear: function() {
|
||||
var items = this.initItems('y'), name, i,
|
||||
var items = [], name, i,
|
||||
longNames = this.options.template.indexOf('YYYY') !== -1;
|
||||
|
||||
|
||||
for(i=this.options.maxYear; i>=this.options.minYear; i--) {
|
||||
name = longNames ? i : (i+'').substring(2);
|
||||
items.push([i, name]);
|
||||
}
|
||||
items[this.options.yearDescending ? 'push' : 'unshift']([i, name]);
|
||||
}
|
||||
|
||||
items = this.initItems('y').concat(items);
|
||||
|
||||
return items;
|
||||
},
|
||||
|
||||
@ -299,6 +302,22 @@
|
||||
that = this,
|
||||
values = {};
|
||||
|
||||
//function to find nearest value in select options
|
||||
function getNearest($select, value) {
|
||||
var delta = {};
|
||||
$select.children('option').each(function(i, opt){
|
||||
var optValue = $(opt).attr('value'),
|
||||
distance;
|
||||
|
||||
if(optValue === '') return;
|
||||
distance = Math.abs(optValue - value);
|
||||
if(typeof delta.distance === 'undefined' || distance < delta.distance) {
|
||||
delta = {value: optValue, distance: distance};
|
||||
}
|
||||
});
|
||||
return delta.value;
|
||||
}
|
||||
|
||||
if(dt.isValid()) {
|
||||
//read values from date object
|
||||
$.each(this.map, function(k, v) {
|
||||
@ -318,7 +337,17 @@
|
||||
}
|
||||
|
||||
$.each(values, function(k, v) {
|
||||
//call val() for each existing combo, e.g. this.$hour.val()
|
||||
if(that['$'+k]) {
|
||||
|
||||
if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) {
|
||||
v = getNearest(that['$'+k], v);
|
||||
}
|
||||
|
||||
if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) {
|
||||
v = getNearest(that['$'+k], v);
|
||||
}
|
||||
|
||||
that['$'+k].val(v);
|
||||
}
|
||||
});
|
||||
@ -393,10 +422,12 @@
|
||||
value: null,
|
||||
minYear: 1970,
|
||||
maxYear: 2015,
|
||||
yearDescending: true,
|
||||
minuteStep: 5,
|
||||
secondStep: 1,
|
||||
firstItem: 'empty', //'name', 'empty', 'none'
|
||||
errorClass: null
|
||||
errorClass: null,
|
||||
roundTime: true //whether to round minutes and seconds if step > 1
|
||||
};
|
||||
|
||||
}(window.jQuery));
|
@ -9,7 +9,6 @@
|
||||
*/
|
||||
.datepicker {
|
||||
padding: 4px;
|
||||
margin-top: 1px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
@ -112,6 +111,7 @@
|
||||
border-color: #fdf59a #fdf59a #fbed50;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #000 !important;
|
||||
}
|
||||
.datepicker table tr td.today:hover,
|
||||
.datepicker table tr td.today:hover:hover,
|
||||
|
@ -41,13 +41,11 @@
|
||||
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||dates[this.language].format||'mm/dd/yyyy');
|
||||
this.isInline = false;
|
||||
this.isInput = this.element.is('input');
|
||||
this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
|
||||
this.component = this.element.is('.date') ? this.element.find('.add-on, .btn') : false;
|
||||
this.hasInput = this.component && this.element.find('input').length;
|
||||
if(this.component && this.component.length === 0)
|
||||
this.component = false;
|
||||
|
||||
this._attachEvents();
|
||||
|
||||
this.forceParse = true;
|
||||
if ('forceParse' in options) {
|
||||
this.forceParse = options.forceParse;
|
||||
@ -55,16 +53,12 @@
|
||||
this.forceParse = this.element.data('date-force-parse');
|
||||
}
|
||||
|
||||
|
||||
this.picker = $(DPGlobal.template)
|
||||
.appendTo(this.isInline ? this.element : 'body')
|
||||
.on({
|
||||
click: $.proxy(this.click, this),
|
||||
mousedown: $.proxy(this.mousedown, this)
|
||||
});
|
||||
this.picker = $(DPGlobal.template);
|
||||
this._buildEvents();
|
||||
this._attachEvents();
|
||||
|
||||
if(this.isInline) {
|
||||
this.picker.addClass('datepicker-inline');
|
||||
this.picker.addClass('datepicker-inline').appendTo(this.element);
|
||||
} else {
|
||||
this.picker.addClass('datepicker-dropdown dropdown-menu');
|
||||
}
|
||||
@ -73,12 +67,6 @@
|
||||
this.picker.find('.prev i, .next i')
|
||||
.toggleClass('icon-arrow-left icon-arrow-right');
|
||||
}
|
||||
$(document).on('mousedown', function (e) {
|
||||
// Clicked outside the datepicker, hide it
|
||||
if ($(e.target).closest('.datepicker.datepicker-inline, .datepicker.datepicker-dropdown').length === 0) {
|
||||
that.hide();
|
||||
}
|
||||
});
|
||||
|
||||
this.autoclose = false;
|
||||
if ('autoclose' in options) {
|
||||
@ -138,6 +126,8 @@
|
||||
return parseInt(val) + 1;
|
||||
});
|
||||
|
||||
this._allow_update = false;
|
||||
|
||||
this.weekStart = ((options.weekStart||this.element.data('date-weekstart')||dates[this.language].weekStart||0) % 7);
|
||||
this.weekEnd = ((this.weekStart + 6) % 7);
|
||||
this.startDate = -Infinity;
|
||||
@ -148,6 +138,9 @@
|
||||
this.setDaysOfWeekDisabled(options.daysOfWeekDisabled||this.element.data('date-days-of-week-disabled'));
|
||||
this.fillDow();
|
||||
this.fillMonths();
|
||||
|
||||
this._allow_update = true;
|
||||
|
||||
this.update();
|
||||
this.showMode();
|
||||
|
||||
@ -160,8 +153,22 @@
|
||||
constructor: Datepicker,
|
||||
|
||||
_events: [],
|
||||
_attachEvents: function(){
|
||||
this._detachEvents();
|
||||
_secondaryEvents: [],
|
||||
_applyEvents: function(evs){
|
||||
for (var i=0, el, ev; i<evs.length; i++){
|
||||
el = evs[i][0];
|
||||
ev = evs[i][1];
|
||||
el.on(ev);
|
||||
}
|
||||
},
|
||||
_unapplyEvents: function(evs){
|
||||
for (var i=0, el, ev; i<evs.length; i++){
|
||||
el = evs[i][0];
|
||||
ev = evs[i][1];
|
||||
el.off(ev);
|
||||
}
|
||||
},
|
||||
_buildEvents: function(){
|
||||
if (this.isInput) { // single input
|
||||
this._events = [
|
||||
[this.element, {
|
||||
@ -184,9 +191,9 @@
|
||||
}]
|
||||
];
|
||||
}
|
||||
else if (this.element.is('div')) { // inline datepicker
|
||||
this.isInline = true;
|
||||
}
|
||||
else if (this.element.is('div')) { // inline datepicker
|
||||
this.isInline = true;
|
||||
}
|
||||
else {
|
||||
this._events = [
|
||||
[this.element, {
|
||||
@ -194,29 +201,47 @@
|
||||
}]
|
||||
];
|
||||
}
|
||||
for (var i=0, el, ev; i<this._events.length; i++){
|
||||
el = this._events[i][0];
|
||||
ev = this._events[i][1];
|
||||
el.on(ev);
|
||||
}
|
||||
|
||||
this._secondaryEvents = [
|
||||
[this.picker, {
|
||||
click: $.proxy(this.click, this)
|
||||
}],
|
||||
[$(window), {
|
||||
resize: $.proxy(this.place, this)
|
||||
}],
|
||||
[$(document), {
|
||||
mousedown: $.proxy(function (e) {
|
||||
// Clicked outside the datepicker, hide it
|
||||
if ($(e.target).closest('.datepicker.datepicker-inline, .datepicker.datepicker-dropdown').length === 0) {
|
||||
this.hide();
|
||||
}
|
||||
}, this)
|
||||
}]
|
||||
];
|
||||
},
|
||||
_attachEvents: function(){
|
||||
this._detachEvents();
|
||||
this._applyEvents(this._events);
|
||||
},
|
||||
_detachEvents: function(){
|
||||
for (var i=0, el, ev; i<this._events.length; i++){
|
||||
el = this._events[i][0];
|
||||
ev = this._events[i][1];
|
||||
el.off(ev);
|
||||
}
|
||||
this._events = [];
|
||||
this._unapplyEvents(this._events);
|
||||
},
|
||||
_attachSecondaryEvents: function(){
|
||||
this._detachSecondaryEvents();
|
||||
this._applyEvents(this._secondaryEvents);
|
||||
},
|
||||
_detachSecondaryEvents: function(){
|
||||
this._unapplyEvents(this._secondaryEvents);
|
||||
},
|
||||
|
||||
show: function(e) {
|
||||
if (!this.isInline)
|
||||
this.picker.appendTo('body');
|
||||
this.picker.show();
|
||||
this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
|
||||
this.update();
|
||||
this.place();
|
||||
$(window).on('resize', $.proxy(this.place, this));
|
||||
if (e ) {
|
||||
e.stopPropagation();
|
||||
this._attachSecondaryEvents();
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.element.trigger({
|
||||
@ -228,13 +253,10 @@
|
||||
hide: function(e){
|
||||
if(this.isInline) return;
|
||||
if (!this.picker.is(':visible')) return;
|
||||
this.picker.hide();
|
||||
$(window).off('resize', this.place);
|
||||
this.picker.hide().detach();
|
||||
this._detachSecondaryEvents();
|
||||
this.viewMode = this.startViewMode;
|
||||
this.showMode();
|
||||
if (!this.isInput) {
|
||||
$(document).off('mousedown', this.hide);
|
||||
}
|
||||
|
||||
if (
|
||||
this.forceParse &&
|
||||
@ -251,9 +273,14 @@
|
||||
},
|
||||
|
||||
remove: function() {
|
||||
this.hide();
|
||||
this._detachEvents();
|
||||
this._detachSecondaryEvents();
|
||||
this.picker.remove();
|
||||
delete this.element.data().datepicker;
|
||||
if (!this.isInput) {
|
||||
delete this.element.data().date;
|
||||
}
|
||||
},
|
||||
|
||||
getDate: function() {
|
||||
@ -327,7 +354,7 @@
|
||||
var zIndex = parseInt(this.element.parents().filter(function() {
|
||||
return $(this).css('z-index') != 'auto';
|
||||
}).first().css('z-index'))+10;
|
||||
var offset = this.component ? this.component.offset() : this.element.offset();
|
||||
var offset = this.component ? this.component.parent().offset() : this.element.offset();
|
||||
var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(true);
|
||||
this.picker.css({
|
||||
top: offset.top + height,
|
||||
@ -336,7 +363,10 @@
|
||||
});
|
||||
},
|
||||
|
||||
_allow_update: true,
|
||||
update: function(){
|
||||
if (!this._allow_update) return;
|
||||
|
||||
var date, fromArgs = false;
|
||||
if(arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) {
|
||||
date = arguments[0];
|
||||
@ -491,6 +521,8 @@
|
||||
},
|
||||
|
||||
updateNavArrows: function() {
|
||||
if (!this._allow_update) return;
|
||||
|
||||
var d = new Date(this.viewDate),
|
||||
year = d.getUTCFullYear(),
|
||||
month = d.getUTCMonth();
|
||||
@ -524,7 +556,6 @@
|
||||
},
|
||||
|
||||
click: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var target = $(e.target).closest('span, td, th');
|
||||
if (target.length == 1) {
|
||||
|
@ -24,7 +24,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Date = function (options) {
|
||||
this.init('date', options, Date.defaults);
|
||||
this.initPicker(options, Date.defaults);
|
||||
@ -108,6 +109,9 @@ $(function(){
|
||||
clear: function() {
|
||||
this.$input.data('datepicker').date = null;
|
||||
this.$input.find('.active').removeClass('active');
|
||||
if(!this.options.showbuttons) {
|
||||
this.$input.closest('form').submit();
|
||||
}
|
||||
},
|
||||
|
||||
autosubmit: function() {
|
||||
|
@ -9,7 +9,8 @@ Automatically shown in inline mode.
|
||||
@since 1.4.0
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var DateField = function (options) {
|
||||
this.init('datefield', options, DateField.defaults);
|
||||
this.initPicker(options, DateField.defaults);
|
||||
|
@ -0,0 +1,342 @@
|
||||
/*!
|
||||
* Datetimepicker for Bootstrap
|
||||
*
|
||||
* Copyright 2012 Stefan Petre
|
||||
* Improvements by Andrew Rowls
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*/
|
||||
.datetimepicker {
|
||||
padding: 4px;
|
||||
margin-top: 1px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
direction: ltr;
|
||||
/*.dow {
|
||||
border-top: 1px solid #ddd !important;
|
||||
}*/
|
||||
|
||||
}
|
||||
.datetimepicker-inline {
|
||||
width: 220px;
|
||||
}
|
||||
.datetimepicker.datetimepicker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.datetimepicker.datetimepicker-rtl table tr td span {
|
||||
float: right;
|
||||
}
|
||||
.datetimepicker-dropdown, .datetimepicker-dropdown-left {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.datetimepicker-dropdown:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 6px;
|
||||
}
|
||||
.datetimepicker-dropdown:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 7px;
|
||||
}
|
||||
.datetimepicker-dropdown-left:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
right: 6px;
|
||||
}
|
||||
.datetimepicker-dropdown-left:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: 7px;
|
||||
}
|
||||
.datetimepicker > div {
|
||||
display: none;
|
||||
}
|
||||
.datetimepicker.minutes div.datetimepicker-minutes {
|
||||
display: block;
|
||||
}
|
||||
.datetimepicker.hours div.datetimepicker-hours {
|
||||
display: block;
|
||||
}
|
||||
.datetimepicker.days div.datetimepicker-days {
|
||||
display: block;
|
||||
}
|
||||
.datetimepicker.months div.datetimepicker-months {
|
||||
display: block;
|
||||
}
|
||||
.datetimepicker.years div.datetimepicker-years {
|
||||
display: block;
|
||||
}
|
||||
.datetimepicker table {
|
||||
margin: 0;
|
||||
}
|
||||
.datetimepicker td,
|
||||
.datetimepicker th {
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
}
|
||||
.table-striped .datetimepicker table tr td,
|
||||
.table-striped .datetimepicker table tr th {
|
||||
background-color: transparent;
|
||||
}
|
||||
.datetimepicker table tr td.minute:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.datetimepicker table tr td.hour:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.datetimepicker table tr td.day:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.datetimepicker table tr td.old,
|
||||
.datetimepicker table tr td.new {
|
||||
color: #999999;
|
||||
}
|
||||
.datetimepicker table tr td.disabled,
|
||||
.datetimepicker table tr td.disabled:hover {
|
||||
background: none;
|
||||
color: #999999;
|
||||
cursor: default;
|
||||
}
|
||||
.datetimepicker table tr td.today,
|
||||
.datetimepicker table tr td.today:hover,
|
||||
.datetimepicker table tr td.today.disabled,
|
||||
.datetimepicker table tr td.today.disabled:hover {
|
||||
background-color: #fde19a;
|
||||
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
|
||||
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
|
||||
border-color: #fdf59a #fdf59a #fbed50;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
.datetimepicker table tr td.today:hover,
|
||||
.datetimepicker table tr td.today:hover:hover,
|
||||
.datetimepicker table tr td.today.disabled:hover,
|
||||
.datetimepicker table tr td.today.disabled:hover:hover,
|
||||
.datetimepicker table tr td.today:active,
|
||||
.datetimepicker table tr td.today:hover:active,
|
||||
.datetimepicker table tr td.today.disabled:active,
|
||||
.datetimepicker table tr td.today.disabled:hover:active,
|
||||
.datetimepicker table tr td.today.active,
|
||||
.datetimepicker table tr td.today:hover.active,
|
||||
.datetimepicker table tr td.today.disabled.active,
|
||||
.datetimepicker table tr td.today.disabled:hover.active,
|
||||
.datetimepicker table tr td.today.disabled,
|
||||
.datetimepicker table tr td.today:hover.disabled,
|
||||
.datetimepicker table tr td.today.disabled.disabled,
|
||||
.datetimepicker table tr td.today.disabled:hover.disabled,
|
||||
.datetimepicker table tr td.today[disabled],
|
||||
.datetimepicker table tr td.today:hover[disabled],
|
||||
.datetimepicker table tr td.today.disabled[disabled],
|
||||
.datetimepicker table tr td.today.disabled:hover[disabled] {
|
||||
background-color: #fdf59a;
|
||||
}
|
||||
.datetimepicker table tr td.today:active,
|
||||
.datetimepicker table tr td.today:hover:active,
|
||||
.datetimepicker table tr td.today.disabled:active,
|
||||
.datetimepicker table tr td.today.disabled:hover:active,
|
||||
.datetimepicker table tr td.today.active,
|
||||
.datetimepicker table tr td.today:hover.active,
|
||||
.datetimepicker table tr td.today.disabled.active,
|
||||
.datetimepicker table tr td.today.disabled:hover.active {
|
||||
background-color: #fbf069 \9;
|
||||
}
|
||||
.datetimepicker table tr td.active,
|
||||
.datetimepicker table tr td.active:hover,
|
||||
.datetimepicker table tr td.active.disabled,
|
||||
.datetimepicker table tr td.active.disabled:hover {
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datetimepicker table tr td.active:hover,
|
||||
.datetimepicker table tr td.active:hover:hover,
|
||||
.datetimepicker table tr td.active.disabled:hover,
|
||||
.datetimepicker table tr td.active.disabled:hover:hover,
|
||||
.datetimepicker table tr td.active:active,
|
||||
.datetimepicker table tr td.active:hover:active,
|
||||
.datetimepicker table tr td.active.disabled:active,
|
||||
.datetimepicker table tr td.active.disabled:hover:active,
|
||||
.datetimepicker table tr td.active.active,
|
||||
.datetimepicker table tr td.active:hover.active,
|
||||
.datetimepicker table tr td.active.disabled.active,
|
||||
.datetimepicker table tr td.active.disabled:hover.active,
|
||||
.datetimepicker table tr td.active.disabled,
|
||||
.datetimepicker table tr td.active:hover.disabled,
|
||||
.datetimepicker table tr td.active.disabled.disabled,
|
||||
.datetimepicker table tr td.active.disabled:hover.disabled,
|
||||
.datetimepicker table tr td.active[disabled],
|
||||
.datetimepicker table tr td.active:hover[disabled],
|
||||
.datetimepicker table tr td.active.disabled[disabled],
|
||||
.datetimepicker table tr td.active.disabled:hover[disabled] {
|
||||
background-color: #0044cc;
|
||||
}
|
||||
.datetimepicker table tr td.active:active,
|
||||
.datetimepicker table tr td.active:hover:active,
|
||||
.datetimepicker table tr td.active.disabled:active,
|
||||
.datetimepicker table tr td.active.disabled:hover:active,
|
||||
.datetimepicker table tr td.active.active,
|
||||
.datetimepicker table tr td.active:hover.active,
|
||||
.datetimepicker table tr td.active.disabled.active,
|
||||
.datetimepicker table tr td.active.disabled:hover.active {
|
||||
background-color: #003399 \9;
|
||||
}
|
||||
.datetimepicker table tr td span {
|
||||
display: block;
|
||||
width: 23%;
|
||||
height: 54px;
|
||||
line-height: 54px;
|
||||
float: left;
|
||||
margin: 1%;
|
||||
cursor: pointer;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.datetimepicker .datetimepicker-hours span {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
}
|
||||
.datetimepicker .datetimepicker-hours table tr td span.hour_am,
|
||||
.datetimepicker .datetimepicker-hours table tr td span.hour_pm {
|
||||
width: 14.6%;
|
||||
}
|
||||
.datetimepicker .datetimepicker-hours fieldset legend,
|
||||
.datetimepicker .datetimepicker-minutes fieldset legend {
|
||||
margin-bottom: inherit;
|
||||
line-height: 30px;
|
||||
}
|
||||
.datetimepicker .datetimepicker-minutes span {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
}
|
||||
.datetimepicker table tr td span:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.datetimepicker table tr td span.disabled,
|
||||
.datetimepicker table tr td span.disabled:hover {
|
||||
background: none;
|
||||
color: #999999;
|
||||
cursor: default;
|
||||
}
|
||||
.datetimepicker table tr td span.active,
|
||||
.datetimepicker table tr td span.active:hover,
|
||||
.datetimepicker table tr td span.active.disabled,
|
||||
.datetimepicker table tr td span.active.disabled:hover {
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datetimepicker table tr td span.active:hover,
|
||||
.datetimepicker table tr td span.active:hover:hover,
|
||||
.datetimepicker table tr td span.active.disabled:hover,
|
||||
.datetimepicker table tr td span.active.disabled:hover:hover,
|
||||
.datetimepicker table tr td span.active:active,
|
||||
.datetimepicker table tr td span.active:hover:active,
|
||||
.datetimepicker table tr td span.active.disabled:active,
|
||||
.datetimepicker table tr td span.active.disabled:hover:active,
|
||||
.datetimepicker table tr td span.active.active,
|
||||
.datetimepicker table tr td span.active:hover.active,
|
||||
.datetimepicker table tr td span.active.disabled.active,
|
||||
.datetimepicker table tr td span.active.disabled:hover.active,
|
||||
.datetimepicker table tr td span.active.disabled,
|
||||
.datetimepicker table tr td span.active:hover.disabled,
|
||||
.datetimepicker table tr td span.active.disabled.disabled,
|
||||
.datetimepicker table tr td span.active.disabled:hover.disabled,
|
||||
.datetimepicker table tr td span.active[disabled],
|
||||
.datetimepicker table tr td span.active:hover[disabled],
|
||||
.datetimepicker table tr td span.active.disabled[disabled],
|
||||
.datetimepicker table tr td span.active.disabled:hover[disabled] {
|
||||
background-color: #0044cc;
|
||||
}
|
||||
.datetimepicker table tr td span.active:active,
|
||||
.datetimepicker table tr td span.active:hover:active,
|
||||
.datetimepicker table tr td span.active.disabled:active,
|
||||
.datetimepicker table tr td span.active.disabled:hover:active,
|
||||
.datetimepicker table tr td span.active.active,
|
||||
.datetimepicker table tr td span.active:hover.active,
|
||||
.datetimepicker table tr td span.active.disabled.active,
|
||||
.datetimepicker table tr td span.active.disabled:hover.active {
|
||||
background-color: #003399 \9;
|
||||
}
|
||||
.datetimepicker table tr td span.old {
|
||||
color: #999999;
|
||||
}
|
||||
.datetimepicker th.switch {
|
||||
width: 145px;
|
||||
}
|
||||
.datetimepicker thead tr:first-child th,
|
||||
.datetimepicker tfoot tr:first-child th {
|
||||
cursor: pointer;
|
||||
}
|
||||
.datetimepicker thead tr:first-child th:hover,
|
||||
.datetimepicker tfoot tr:first-child th:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.input-append.date .add-on i,
|
||||
.input-prepend.date .add-on i {
|
||||
cursor: pointer;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
1453
src/inputs/datetime/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js
vendored
Normal file
217
src/inputs/datetime/datetime.js
Normal file
@ -0,0 +1,217 @@
|
||||
/**
|
||||
Bootstrap-datetimepicker.
|
||||
Based on [smalot bootstrap-datetimepicker plugin](https://github.com/smalot/bootstrap-datetimepicker).
|
||||
Before usage you should manually include dependent js and css:
|
||||
|
||||
<link href="css/datetimepicker.css" rel="stylesheet" type="text/css"></link>
|
||||
<script src="js/bootstrap-datetimepicker.js"></script>
|
||||
|
||||
For **i18n** you should include js file from here: https://github.com/smalot/bootstrap-datetimepicker/tree/master/js/locales
|
||||
and set `language` option.
|
||||
|
||||
@class datetime
|
||||
@extends abstractinput
|
||||
@final
|
||||
@since 1.4.4
|
||||
@example
|
||||
<a href="#" id="last_seen" data-type="datetime" data-pk="1" data-url="/post" title="Select date & time">15/03/2013 12:45</a>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#last_seen').editable({
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
viewformat: 'dd/mm/yyyy hh:ii',
|
||||
datetimepicker: {
|
||||
weekStart: 1
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var DateTime = function (options) {
|
||||
this.init('datetime', options, DateTime.defaults);
|
||||
this.initPicker(options, DateTime.defaults);
|
||||
};
|
||||
|
||||
$.fn.editableutils.inherit(DateTime, $.fn.editabletypes.abstractinput);
|
||||
|
||||
$.extend(DateTime.prototype, {
|
||||
initPicker: function(options, defaults) {
|
||||
//'format' is set directly from settings or data-* attributes
|
||||
|
||||
//by default viewformat equals to format
|
||||
if(!this.options.viewformat) {
|
||||
this.options.viewformat = this.options.format;
|
||||
}
|
||||
|
||||
//overriding datetimepicker config (as by default jQuery extend() is not recursive)
|
||||
//since 1.4 datetimepicker internally uses viewformat instead of format. Format is for submit only
|
||||
this.options.datetimepicker = $.extend({}, defaults.datetimepicker, options.datetimepicker, {
|
||||
format: this.options.viewformat
|
||||
});
|
||||
|
||||
//language
|
||||
this.options.datetimepicker.language = this.options.datetimepicker.language || 'en';
|
||||
|
||||
//store DPglobal
|
||||
this.dpg = $.fn.datetimepicker.DPGlobal;
|
||||
|
||||
//store parsed formats
|
||||
this.parsedFormat = this.dpg.parseFormat(this.options.format, this.options.formatType);
|
||||
this.parsedViewFormat = this.dpg.parseFormat(this.options.viewformat, this.options.formatType);
|
||||
|
||||
//
|
||||
this.options.datetimepicker.startView = this.options.startView;
|
||||
this.options.datetimepicker.minView = this.options.minView;
|
||||
this.options.datetimepicker.maxView = this.options.maxView;
|
||||
},
|
||||
|
||||
render: function () {
|
||||
this.$input.datetimepicker(this.options.datetimepicker);
|
||||
|
||||
//"clear" link
|
||||
if(this.options.clear) {
|
||||
this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.clear();
|
||||
}, this));
|
||||
|
||||
this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear));
|
||||
}
|
||||
},
|
||||
|
||||
value2html: function(value, element) {
|
||||
//formatDate works with UTCDate!
|
||||
var text = value ? this.dpg.formatDate(this.toUTC(value), this.parsedViewFormat, this.options.datetimepicker.language, this.options.formatType) : '';
|
||||
if(element) {
|
||||
DateTime.superclass.value2html(text, element);
|
||||
} else {
|
||||
return text;
|
||||
}
|
||||
},
|
||||
|
||||
html2value: function(html) {
|
||||
//parseDate return utc date!
|
||||
var value = html ? this.dpg.parseDate(html, this.parsedViewFormat, this.options.datetimepicker.language, this.options.formatType) : null;
|
||||
return value ? this.fromUTC(value) : null;
|
||||
},
|
||||
|
||||
value2str: function(value) {
|
||||
//formatDate works with UTCDate!
|
||||
return value ? this.dpg.formatDate(this.toUTC(value), this.parsedFormat, this.options.datetimepicker.language, this.options.formatType) : '';
|
||||
},
|
||||
|
||||
str2value: function(str) {
|
||||
//parseDate return utc date!
|
||||
var value = str ? this.dpg.parseDate(str, this.parsedFormat, this.options.datetimepicker.language, this.options.formatType) : null;
|
||||
return value ? this.fromUTC(value) : null;
|
||||
},
|
||||
|
||||
value2submit: function(value) {
|
||||
return this.value2str(value);
|
||||
},
|
||||
|
||||
value2input: function(value) {
|
||||
if(value) {
|
||||
this.$input.data('datetimepicker').setDate(value);
|
||||
}
|
||||
},
|
||||
|
||||
input2value: function() {
|
||||
//date may be cleared, in that case getDate() triggers error
|
||||
var dt = this.$input.data('datetimepicker');
|
||||
return dt.date ? dt.getDate() : null;
|
||||
},
|
||||
|
||||
activate: function() {
|
||||
},
|
||||
|
||||
clear: function() {
|
||||
this.$input.data('datetimepicker').date = null;
|
||||
this.$input.find('.active').removeClass('active');
|
||||
if(!this.options.showbuttons) {
|
||||
this.$input.closest('form').submit();
|
||||
}
|
||||
},
|
||||
|
||||
autosubmit: function() {
|
||||
this.$input.on('mouseup', '.minute', function(e){
|
||||
var $form = $(this).closest('form');
|
||||
setTimeout(function() {
|
||||
$form.submit();
|
||||
}, 200);
|
||||
});
|
||||
},
|
||||
|
||||
//convert date from local to utc
|
||||
toUTC: function(value) {
|
||||
return value ? new Date(value.valueOf() - value.getTimezoneOffset() * 60000) : value;
|
||||
},
|
||||
|
||||
//convert date from utc to local
|
||||
fromUTC: function(value) {
|
||||
return value ? new Date(value.valueOf() + value.getTimezoneOffset() * 60000) : value;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
DateTime.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, {
|
||||
/**
|
||||
@property tpl
|
||||
@default <div></div>
|
||||
**/
|
||||
tpl:'<div class="editable-date well"></div>',
|
||||
/**
|
||||
@property inputclass
|
||||
@default null
|
||||
**/
|
||||
inputclass: null,
|
||||
/**
|
||||
Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br>
|
||||
Possible tokens are: <code>d, dd, m, mm, yy, yyyy, h, i</code>
|
||||
|
||||
@property format
|
||||
@type string
|
||||
@default yyyy-mm-dd hh:ii
|
||||
**/
|
||||
format:'yyyy-mm-dd hh:ii',
|
||||
formatType:'standard',
|
||||
/**
|
||||
Format used for displaying date. Also applied when converting date from element's text on init.
|
||||
If not specified equals to <code>format</code>
|
||||
|
||||
@property viewformat
|
||||
@type string
|
||||
@default null
|
||||
**/
|
||||
viewformat: null,
|
||||
/**
|
||||
Configuration of datetimepicker.
|
||||
Full list of options: https://github.com/smalot/bootstrap-datetimepicker
|
||||
|
||||
@property datetimepicker
|
||||
@type object
|
||||
@default { }
|
||||
**/
|
||||
datetimepicker:{
|
||||
todayHighlight: false,
|
||||
autoclose: false
|
||||
},
|
||||
/**
|
||||
Text shown as clear date button.
|
||||
If <code>false</code> clear button will not be rendered.
|
||||
|
||||
@property clear
|
||||
@type boolean|string
|
||||
@default 'x clear'
|
||||
**/
|
||||
clear: '× clear'
|
||||
});
|
||||
|
||||
$.fn.editabletypes.datetime = DateTime;
|
||||
|
||||
}(window.jQuery));
|
77
src/inputs/datetime/datetimefield.js
Normal file
@ -0,0 +1,77 @@
|
||||
/**
|
||||
Bootstrap datetimefield input - datetime input for inline mode.
|
||||
Shows normal <input type="text"> and binds popup datetimepicker.
|
||||
Automatically shown in inline mode.
|
||||
|
||||
@class datetimefield
|
||||
@extends datetime
|
||||
|
||||
**/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var DateTimeField = function (options) {
|
||||
this.init('datetimefield', options, DateTimeField.defaults);
|
||||
this.initPicker(options, DateTimeField.defaults);
|
||||
};
|
||||
|
||||
$.fn.editableutils.inherit(DateTimeField, $.fn.editabletypes.datetime);
|
||||
|
||||
$.extend(DateTimeField.prototype, {
|
||||
render: function () {
|
||||
this.$input = this.$tpl.find('input');
|
||||
this.setClass();
|
||||
this.setAttr('placeholder');
|
||||
|
||||
this.$tpl.datetimepicker(this.options.datetimepicker);
|
||||
|
||||
//need to disable original event handlers
|
||||
this.$input.off('focus keydown');
|
||||
|
||||
//update value of datepicker
|
||||
this.$input.keyup($.proxy(function(){
|
||||
this.$tpl.removeData('date');
|
||||
this.$tpl.datetimepicker('update');
|
||||
}, this));
|
||||
|
||||
},
|
||||
|
||||
value2input: function(value) {
|
||||
this.$input.val(this.value2html(value));
|
||||
this.$tpl.datetimepicker('update');
|
||||
},
|
||||
|
||||
input2value: function() {
|
||||
return this.html2value(this.$input.val());
|
||||
},
|
||||
|
||||
activate: function() {
|
||||
$.fn.editabletypes.text.prototype.activate.call(this);
|
||||
},
|
||||
|
||||
autosubmit: function() {
|
||||
//reset autosubmit to empty
|
||||
}
|
||||
});
|
||||
|
||||
DateTimeField.defaults = $.extend({}, $.fn.editabletypes.datetime.defaults, {
|
||||
/**
|
||||
@property tpl
|
||||
**/
|
||||
tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',
|
||||
/**
|
||||
@property inputclass
|
||||
@default 'input-medium'
|
||||
**/
|
||||
inputclass: 'input-medium',
|
||||
|
||||
/* datetimepicker config */
|
||||
datetimepicker:{
|
||||
todayHighlight: false,
|
||||
autoclose: true
|
||||
}
|
||||
});
|
||||
|
||||
$.fn.editabletypes.datetimefield = DateTimeField;
|
||||
|
||||
}(window.jQuery));
|
@ -23,7 +23,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var DateUI = function (options) {
|
||||
this.init('dateui', options, DateUI.defaults);
|
||||
this.initPicker(options, DateUI.defaults);
|
||||
|
@ -9,7 +9,8 @@ Automatically shown in inline mode.
|
||||
@since 1.4.0
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var DateUIField = function (options) {
|
||||
this.init('dateuifield', options, DateUIField.defaults);
|
||||
this.initPicker(options, DateUIField.defaults);
|
||||
|
After ![]() (image error) Size: 1.7 KiB |
Before ![]() (image error) Size: 180 B After ![]() (image error) Size: 212 B ![]() ![]() |
Before ![]() (image error) Size: 182 B After ![]() (image error) Size: 206 B ![]() ![]() |
Before ![]() (image error) Size: 162 B After ![]() (image error) Size: 336 B ![]() ![]() |
Before ![]() (image error) Size: 123 B After ![]() (image error) Size: 341 B ![]() ![]() |
Before ![]() (image error) Size: 119 B After ![]() (image error) Size: 332 B ![]() ![]() |
BIN
src/inputs/dateui/jquery-ui-datepicker/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png
Before ![]() (image error) Size: 3.4 KiB After ![]() (image error) Size: 5.7 KiB ![]() ![]() |
Before ![]() (image error) Size: 104 B After ![]() (image error) Size: 333 B ![]() ![]() |
Before ![]() (image error) Size: 88 B After ![]() (image error) Size: 292 B ![]() ![]() |
Before ![]() (image error) Size: 4.3 KiB After ![]() (image error) Size: 4.4 KiB ![]() ![]() |
Before ![]() (image error) Size: 4.3 KiB After ![]() (image error) Size: 4.4 KiB ![]() ![]() |
Before ![]() (image error) Size: 4.3 KiB After ![]() (image error) Size: 4.4 KiB ![]() ![]() |
Before ![]() (image error) Size: 4.3 KiB After ![]() (image error) Size: 4.4 KiB ![]() ![]() |
Before ![]() (image error) Size: 4.3 KiB After ![]() (image error) Size: 4.4 KiB ![]() ![]() |
Before ![]() (image error) Size: 4.3 KiB After ![]() (image error) Size: 4.4 KiB ![]() ![]() |
Before ![]() (image error) Size: 4.3 KiB After ![]() (image error) Size: 4.4 KiB ![]() ![]() |
649
src/inputs/dateui/jquery-ui-datepicker/css/redmond/jquery-ui-1.10.2.custom.css
vendored
Normal file
@ -0,0 +1,649 @@
|
||||
/*! jQuery UI - v1.10.2 - 2013-04-07
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.datepicker.css
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande%2CLucida%20Sans%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=gloss_wave&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=inset_hard&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=glass&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=inset_hard&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
||||
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden {
|
||||
display: none;
|
||||
}
|
||||
.ui-helper-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
.ui-helper-reset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
line-height: 1.3;
|
||||
text-decoration: none;
|
||||
font-size: 100%;
|
||||
list-style: none;
|
||||
}
|
||||
.ui-helper-clearfix:before,
|
||||
.ui-helper-clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.ui-helper-clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.ui-helper-clearfix {
|
||||
min-height: 0; /* support: IE7 */
|
||||
}
|
||||
.ui-helper-zfix {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter:Alpha(Opacity=0);
|
||||
}
|
||||
|
||||
.ui-front {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-datepicker {
|
||||
width: 17em;
|
||||
padding: .2em .2em 0;
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-header {
|
||||
position: relative;
|
||||
padding: .2em 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev,
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 1.8em;
|
||||
height: 1.8em;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover,
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
top: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev {
|
||||
left: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
right: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover {
|
||||
left: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
right: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev span,
|
||||
.ui-datepicker .ui-datepicker-next span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title {
|
||||
margin: 0 2.3em;
|
||||
line-height: 1.8em;
|
||||
text-align: center;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title select {
|
||||
font-size: 1em;
|
||||
margin: 1px 0;
|
||||
}
|
||||
.ui-datepicker select.ui-datepicker-month-year {
|
||||
width: 100%;
|
||||
}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year {
|
||||
width: 49%;
|
||||
}
|
||||
.ui-datepicker table {
|
||||
width: 100%;
|
||||
font-size: .9em;
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 .4em;
|
||||
}
|
||||
.ui-datepicker th {
|
||||
padding: .7em .3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
.ui-datepicker td {
|
||||
border: 0;
|
||||
padding: 1px;
|
||||
}
|
||||
.ui-datepicker td span,
|
||||
.ui-datepicker td a {
|
||||
display: block;
|
||||
padding: .2em;
|
||||
text-align: right;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane {
|
||||
background-image: none;
|
||||
margin: .7em 0 0 0;
|
||||
padding: 0 .2em;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button {
|
||||
float: right;
|
||||
margin: .5em .2em .4em;
|
||||
cursor: pointer;
|
||||
padding: .2em .6em .3em .6em;
|
||||
width: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi {
|
||||
width: auto;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group table {
|
||||
width: 95%;
|
||||
margin: 0 auto .4em;
|
||||
}
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group {
|
||||
width: 50%;
|
||||
}
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group {
|
||||
width: 33.3%;
|
||||
}
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group {
|
||||
width: 25%;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-left-width: 0;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
||||
clear: left;
|
||||
}
|
||||
.ui-datepicker-row-break {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev {
|
||||
right: 2px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next {
|
||||
left: 2px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
||||
right: 1px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
||||
clear: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
||||
.ui-datepicker-rtl .ui-datepicker-group {
|
||||
float: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-right-width: 0;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget {
|
||||
font-family: Lucida Grande,Lucida Sans,Arial,sans-serif;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.ui-widget .ui-widget {
|
||||
font-size: 1em;
|
||||
}
|
||||
.ui-widget input,
|
||||
.ui-widget select,
|
||||
.ui-widget textarea,
|
||||
.ui-widget button {
|
||||
font-family: Lucida Grande,Lucida Sans,Arial,sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
.ui-widget-content {
|
||||
border: 1px solid #a6c9e2;
|
||||
background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;
|
||||
color: #222222;
|
||||
}
|
||||
.ui-widget-content a {
|
||||
color: #222222;
|
||||
}
|
||||
.ui-widget-header {
|
||||
border: 1px solid #4297d7;
|
||||
background: #5c9ccc url(images/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ui-widget-header a {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default,
|
||||
.ui-widget-content .ui-state-default,
|
||||
.ui-widget-header .ui-state-default {
|
||||
border: 1px solid #c5dbec;
|
||||
background: #dfeffc url(images/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;
|
||||
font-weight: bold;
|
||||
color: #2e6e9e;
|
||||
}
|
||||
.ui-state-default a,
|
||||
.ui-state-default a:link,
|
||||
.ui-state-default a:visited {
|
||||
color: #2e6e9e;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-state-hover,
|
||||
.ui-widget-content .ui-state-hover,
|
||||
.ui-widget-header .ui-state-hover,
|
||||
.ui-state-focus,
|
||||
.ui-widget-content .ui-state-focus,
|
||||
.ui-widget-header .ui-state-focus {
|
||||
border: 1px solid #79b7e7;
|
||||
background: #d0e5f5 url(images/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x;
|
||||
font-weight: bold;
|
||||
color: #1d5987;
|
||||
}
|
||||
.ui-state-hover a,
|
||||
.ui-state-hover a:hover,
|
||||
.ui-state-hover a:link,
|
||||
.ui-state-hover a:visited {
|
||||
color: #1d5987;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-state-active,
|
||||
.ui-widget-content .ui-state-active,
|
||||
.ui-widget-header .ui-state-active {
|
||||
border: 1px solid #79b7e7;
|
||||
background: #f5f8f9 url(images/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x;
|
||||
font-weight: bold;
|
||||
color: #e17009;
|
||||
}
|
||||
.ui-state-active a,
|
||||
.ui-state-active a:link,
|
||||
.ui-state-active a:visited {
|
||||
color: #e17009;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight,
|
||||
.ui-widget-content .ui-state-highlight,
|
||||
.ui-widget-header .ui-state-highlight {
|
||||
border: 1px solid #fad42e;
|
||||
background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x;
|
||||
color: #363636;
|
||||
}
|
||||
.ui-state-highlight a,
|
||||
.ui-widget-content .ui-state-highlight a,
|
||||
.ui-widget-header .ui-state-highlight a {
|
||||
color: #363636;
|
||||
}
|
||||
.ui-state-error,
|
||||
.ui-widget-content .ui-state-error,
|
||||
.ui-widget-header .ui-state-error {
|
||||
border: 1px solid #cd0a0a;
|
||||
background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
|
||||
color: #cd0a0a;
|
||||
}
|
||||
.ui-state-error a,
|
||||
.ui-widget-content .ui-state-error a,
|
||||
.ui-widget-header .ui-state-error a {
|
||||
color: #cd0a0a;
|
||||
}
|
||||
.ui-state-error-text,
|
||||
.ui-widget-content .ui-state-error-text,
|
||||
.ui-widget-header .ui-state-error-text {
|
||||
color: #cd0a0a;
|
||||
}
|
||||
.ui-priority-primary,
|
||||
.ui-widget-content .ui-priority-primary,
|
||||
.ui-widget-header .ui-priority-primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
.ui-priority-secondary,
|
||||
.ui-widget-content .ui-priority-secondary,
|
||||
.ui-widget-header .ui-priority-secondary {
|
||||
opacity: .7;
|
||||
filter:Alpha(Opacity=70);
|
||||
font-weight: normal;
|
||||
}
|
||||
.ui-state-disabled,
|
||||
.ui-widget-content .ui-state-disabled,
|
||||
.ui-widget-header .ui-state-disabled {
|
||||
opacity: .35;
|
||||
filter:Alpha(Opacity=35);
|
||||
background-image: none;
|
||||
}
|
||||
.ui-state-disabled .ui-icon {
|
||||
filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
|
||||
}
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.ui-icon,
|
||||
.ui-widget-content .ui-icon {
|
||||
background-image: url(images/ui-icons_469bdd_256x240.png);
|
||||
}
|
||||
.ui-widget-header .ui-icon {
|
||||
background-image: url(images/ui-icons_d8e7f3_256x240.png);
|
||||
}
|
||||
.ui-state-default .ui-icon {
|
||||
background-image: url(images/ui-icons_6da8d5_256x240.png);
|
||||
}
|
||||
.ui-state-hover .ui-icon,
|
||||
.ui-state-focus .ui-icon {
|
||||
background-image: url(images/ui-icons_217bc0_256x240.png);
|
||||
}
|
||||
.ui-state-active .ui-icon {
|
||||
background-image: url(images/ui-icons_f9bd01_256x240.png);
|
||||
}
|
||||
.ui-state-highlight .ui-icon {
|
||||
background-image: url(images/ui-icons_2e83ff_256x240.png);
|
||||
}
|
||||
.ui-state-error .ui-icon,
|
||||
.ui-state-error-text .ui-icon {
|
||||
background-image: url(images/ui-icons_cd0a0a_256x240.png);
|
||||
}
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-blank { background-position: 16px 16px; }
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-on { background-position: -96px -144px; }
|
||||
.ui-icon-radio-off { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-left-radius: 5px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-right-radius: 5px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
|
||||
opacity: .3;
|
||||
filter: Alpha(Opacity=30);
|
||||
}
|
||||
.ui-widget-shadow {
|
||||
margin: -8px 0 0 -8px;
|
||||
padding: 8px;
|
||||
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
|
||||
opacity: .3;
|
||||
filter: Alpha(Opacity=30);
|
||||
border-radius: 8px;
|
||||
}
|
5
src/inputs/dateui/jquery-ui-datepicker/css/redmond/jquery-ui-1.10.2.custom.min.css
vendored
Normal file
2352
src/inputs/dateui/jquery-ui-datepicker/js/jquery-ui-1.10.2.custom.js
vendored
Normal file
7
src/inputs/dateui/jquery-ui-datepicker/js/jquery-ui-1.10.2.custom.min.js
vendored
Normal file
@ -39,6 +39,8 @@ $(function(){
|
||||
Password
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Password = function (options) {
|
||||
this.init('password', options, Password.defaults);
|
||||
};
|
||||
@ -68,6 +70,8 @@ Password
|
||||
Email
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Email = function (options) {
|
||||
this.init('email', options, Email.defaults);
|
||||
};
|
||||
@ -83,6 +87,8 @@ Email
|
||||
Url
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Url = function (options) {
|
||||
this.init('url', options, Url.defaults);
|
||||
};
|
||||
@ -98,6 +104,8 @@ Url
|
||||
Tel
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Tel = function (options) {
|
||||
this.init('tel', options, Tel.defaults);
|
||||
};
|
||||
@ -113,6 +121,8 @@ Tel
|
||||
Number
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var NumberInput = function (options) {
|
||||
this.init('number', options, NumberInput.defaults);
|
||||
};
|
||||
@ -123,7 +133,21 @@ Number
|
||||
this.setAttr('min');
|
||||
this.setAttr('max');
|
||||
this.setAttr('step');
|
||||
}
|
||||
},
|
||||
postrender: function() {
|
||||
if(this.$clear) {
|
||||
//increase right ffset for up/down arrows
|
||||
this.$clear.css({right: 24});
|
||||
/*
|
||||
//can position clear button only here, when form is shown and height can be calculated
|
||||
var h = this.$input.outerHeight(true) || 20,
|
||||
delta = (h - this.$clear.height()) / 2;
|
||||
|
||||
//add 12px to offset right for up/down arrows
|
||||
this.$clear.css({top: delta, right: delta + 16});
|
||||
*/
|
||||
}
|
||||
}
|
||||
});
|
||||
NumberInput.defaults = $.extend({}, $.fn.editabletypes.text.defaults, {
|
||||
tpl: '<input type="number">',
|
||||
@ -140,6 +164,8 @@ Number
|
||||
Range (inherit from number)
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Range = function (options) {
|
||||
this.init('range', options, Range.defaults);
|
||||
};
|
||||
|
@ -5,7 +5,8 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
@extends abstractinput
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var List = function (options) {
|
||||
|
||||
};
|
||||
|
@ -20,7 +20,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Select = function (options) {
|
||||
this.init('select', options, Select.defaults);
|
||||
};
|
||||
|
@ -1,12 +1,18 @@
|
||||
Copyright 2012 Igor Vaynberg
|
||||
|
||||
|
||||
Version: @@ver@@ Timestamp: @@timestamp@@
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in
|
||||
compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
|
||||
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
||||
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
||||
use of this software only upon the condition that you accept all of the terms of either the Apache
|
||||
License or the GPL License.
|
||||
|
||||
You may obtain a copy of the Apache License and the GPL License at:
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
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.
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
|
||||
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
either express or implied. See the Apache License and the GPL License for the specific language governing
|
||||
permissions and limitations under the Apache License and the GPL License.
|
@ -1,23 +1,21 @@
|
||||
Select2
|
||||
=================
|
||||
|
||||
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results. Look and feel of Select2 is based on the excellent [Chosen](http://harvesthq.github.com/chosen/) library.
|
||||
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
|
||||
|
||||
To get started -- checkout http://ivaynberg.github.com/select2!
|
||||
To get started checkout examples and documentation at http://ivaynberg.github.com/select2
|
||||
|
||||
What Does Select2 Support That Chosen Does Not?
|
||||
What Usecases Does Select2 Support
|
||||
-------------------------------------------------
|
||||
|
||||
* Working with large datasets: Chosen requires the entire dataset to be loaded as `option` tags in the DOM, which limits
|
||||
it to working with small-ish datasets. Select2 uses a function to find results on-the-fly, which allows it to partially
|
||||
load results.
|
||||
* Paging of results: Since Select2 works with large datasets and only loads a small amount of matching results at a time
|
||||
it has to support paging. Select2 will call the search function when the user scrolls to the bottom of currently loaded
|
||||
result set allowing for the 'infinite scrolling' of results.
|
||||
* Custom markup for results: Chosen only supports rendering text results because that is the only markup supported by
|
||||
`option` tags. Select2 provides an extension point which can be used to produce any kind of markup to represent results.
|
||||
* Ability to add results on the fly: Select2 provides the ability to add results from the search term entered by the user, which allows it to be used for
|
||||
tagging.
|
||||
* Enhances native selects with search
|
||||
* Enhances native selects with a better multi-select interface
|
||||
* Loading data from javascript: easily load items via ajax and have them searchable
|
||||
* Nested optgroups: native selects only support one level of nested, Select2 does not have this restriction
|
||||
* Tagging: ability to add new items on the fly
|
||||
* Working with large remote datesets: ability to partially load a dataset based on the search term
|
||||
* Paging of large datasets: easy support for loading more pages when the results are scrolled to the end
|
||||
* Templating: support for custom rendering of results and selections
|
||||
|
||||
Browser Compatibility
|
||||
--------------------
|
||||
@ -30,10 +28,21 @@ Browser Compatibility
|
||||
Integrations
|
||||
------------
|
||||
|
||||
* [Wicket-Select2](https://github.com/ivaynberg/wicket-select2) (Java / Apache Wicket)
|
||||
* [Wicket-Select2](https://github.com/ivaynberg/wicket-select2) (Java / [Apache Wicket](http://wicket.apache.org))
|
||||
* [select2-rails](https://github.com/argerim/select2-rails) (Ruby on Rails)
|
||||
* [AngularUI](http://angular-ui.github.com/#directives-select2) ([AngularJS](angularjs.org))
|
||||
* [Django](https://github.com/applegrew/django-select2)
|
||||
* [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin)
|
||||
* [Bootstrap](https://github.com/t0m/select2-bootstrap-css) (CSS skin)
|
||||
|
||||
Internationalization (i18n)
|
||||
---------------------------
|
||||
|
||||
Select2 supports multiple languages by simply including the right
|
||||
language JS file (`select2_locale_it.js`, `select2_locale_nl.js` etc.).
|
||||
|
||||
Missing a language? Just copy `select2_locale_en.js.template`, translate
|
||||
it and make a pull request back to Select2 here on Github.
|
||||
|
||||
Bug tracker
|
||||
-----------
|
||||
@ -42,7 +51,6 @@ Have a bug? Please create an issue here on GitHub!
|
||||
|
||||
https://github.com/ivaynberg/select2/issues
|
||||
|
||||
|
||||
Mailing list
|
||||
------------
|
||||
|
||||
@ -58,11 +66,17 @@ Copyright and License
|
||||
|
||||
Copyright 2012 Igor Vaynberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in
|
||||
compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
|
||||
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
||||
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
||||
use of this software only upon the condition that you accept all of the terms of either the Apache
|
||||
License or the GPL License.
|
||||
|
||||
You may obtain a copy of the Apache License and the GPL License in the LICENSE file, or at:
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
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.
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
|
||||
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
either express or implied. See the Apache License and the GPL License for the specific language governing
|
||||
permissions and limitations under the Apache License and the GPL License.
|
||||
|
8
src/inputs/select2/lib/component.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "select2",
|
||||
"version": "3.3.2",
|
||||
"main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "spinner.gif"],
|
||||
"dependencies": {
|
||||
"jquery": "~1.4.4"
|
||||
}
|
||||
}
|
@ -15,13 +15,21 @@ js="$name.js"
|
||||
mini="$name.min.js"
|
||||
css="$name.css"
|
||||
release="$name-$ver"
|
||||
tag="release-$ver"
|
||||
tag="$ver"
|
||||
branch="build-$ver"
|
||||
curbranch=`git branch | grep "*" | sed "s/* //"`
|
||||
timestamp=$(date)
|
||||
tokens="s/@@ver@@/$ver/g;s/\@@timestamp@@/$timestamp/g"
|
||||
remote="github"
|
||||
|
||||
echo "Updating Version Identifiers"
|
||||
|
||||
sed -E -e "s/\"version\": \"([0-9\.]+)\",/\"version\": \"$ver\",/g" -i "" component.json select2.jquery.json
|
||||
git add component.json
|
||||
git add select2.jquery.json
|
||||
git commit -m "modified version identifiers in descriptors for release $ver"
|
||||
git push
|
||||
|
||||
git branch "$branch"
|
||||
git checkout "$branch"
|
||||
|
||||
@ -29,6 +37,7 @@ echo "Tokenizing..."
|
||||
|
||||
find . -name "$js" | xargs -I{} sed -e "$tokens" -i "" {}
|
||||
find . -name "$css" | xargs -I{} sed -e "$tokens" -i "" {}
|
||||
sed -e "s/latest/$ver/g" -i "" component.json
|
||||
|
||||
git add "$js"
|
||||
git add "$css"
|
||||
@ -40,11 +49,8 @@ cat LICENSE | sed "$tokens" >> "$mini"
|
||||
echo "*/" >> "$mini"
|
||||
|
||||
curl -s \
|
||||
-d compilation_level=SIMPLE_OPTIMIZATIONS \
|
||||
-d output_format=text \
|
||||
-d output_info=compiled_code \
|
||||
--data-urlencode "js_code@$js" \
|
||||
http://closure-compiler.appspot.com/compile \
|
||||
http://marijnhaverbeke.nl/uglifyjs \
|
||||
>> "$mini"
|
||||
|
||||
git add "$mini"
|
||||
|
91
src/inputs/select2/lib/select2-bootstrap.css
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
.select2-container {
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
.select2-container .select2-choice {
|
||||
border:1px solid #ccc;
|
||||
height:28px;
|
||||
border-radius: 3px;
|
||||
line-height: 29px;
|
||||
background-image:none;
|
||||
filter:none;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.select2-container .select2-choice div {
|
||||
border-left:none;
|
||||
background:none;
|
||||
background-image:none;
|
||||
filter:none;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-choices {
|
||||
border:1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
background-image:none;
|
||||
filter:none;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.control-group.error .select2-container-multi .select2-choices {
|
||||
border-color:#B94A48;
|
||||
}
|
||||
|
||||
.control-group.error .select2-container .select2-choice {
|
||||
border-color:#B94A48;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-choices .select2-search-field {
|
||||
height:28px;
|
||||
line-height: 27px;
|
||||
}
|
||||
|
||||
.select2-container-active .select2-choice,
|
||||
.select2-container-active .select2-choices,
|
||||
.select2-container-multi.select2-container-active .select2-choices {
|
||||
border-color: rgba(82, 168, 236, 0.8);
|
||||
outline: none;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);
|
||||
}
|
||||
|
||||
.input-append .select2-container, .input-prepend .select2-container {
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
.input-prepend .select2-container > a.select2-choice,
|
||||
.input-prepend .select2-container-multi .select2-choices {
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
|
||||
.input-append .select2-container > a,
|
||||
.input-append .select2-container-multi .select2-choices {
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
|
||||
.input-prepend .select2-container > a.select2-choice > div,
|
||||
.input-append .select2-container > a.select2-choice > div {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.input-append .select2-offscreen,
|
||||
.input-prepend .select2-offscreen {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/**
|
||||
* This stops the quick flash when a native selectbox is shown and
|
||||
* then replaced by a select2 input when javascript kicks in. This can be
|
||||
* removed if javascript is not present
|
||||
*/
|
||||
select.select2 {
|
||||
height:28px;
|
||||
visibility:hidden;
|
||||
}
|
Before ![]() (image error) Size: 1.8 KiB After ![]() (image error) Size: 1.8 KiB ![]() ![]() |
611
src/inputs/select2/lib/select2.css
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
||||
Version: 3.3.2 Timestamp: Mon Mar 25 12:14:18 PDT 2013
|
||||
*/
|
||||
.select2-container {
|
||||
position: relative;
|
||||
@ -7,7 +7,7 @@ Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
||||
/* inline-block for ie7 */
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
vertical-align: top;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.select2-container,
|
||||
@ -20,52 +20,64 @@ Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
||||
|
||||
More Info : http://www.quirksmode.org/css/box.html
|
||||
*/
|
||||
-moz-box-sizing: border-box; /* firefox */
|
||||
-ms-box-sizing: border-box; /* ie */
|
||||
-webkit-box-sizing: border-box; /* webkit */
|
||||
-khtml-box-sizing: border-box; /* konqueror */
|
||||
box-sizing: border-box; /* css3 */
|
||||
-khtml-box-sizing: border-box; /* konqueror */
|
||||
-moz-box-sizing: border-box; /* firefox */
|
||||
-ms-box-sizing: border-box; /* ie */
|
||||
box-sizing: border-box; /* css3 */
|
||||
}
|
||||
|
||||
.select2-container .select2-choice {
|
||||
display: block;
|
||||
height: 26px;
|
||||
padding: 0 0 0 8px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
border: 1px solid #aaa;
|
||||
white-space: nowrap;
|
||||
line-height: 26px;
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
background-color: #fff;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
|
||||
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
|
||||
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
|
||||
background-image: -o-linear-gradient(bottom, #eeeeee 0%, #ffffff 50%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 0%, #ffffff 50%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0);
|
||||
background-image: linear-gradient(top, #eeeeee 0%, #ffffff 50%);
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-background-clip: padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid #aaa;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
padding: 0 0 0 8px;
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
background-image: -ms-linear-gradient(top, #ffffff 0%, #eeeeee 50%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
|
||||
background-image: linear-gradient(top, #ffffff 0%, #eeeeee 50%);
|
||||
}
|
||||
|
||||
.select2-container.select2-drop-above .select2-choice
|
||||
{
|
||||
.select2-container.select2-drop-above .select2-choice {
|
||||
border-bottom-color: #aaa;
|
||||
-webkit-border-radius:0px 0px 4px 4px;
|
||||
-moz-border-radius:0px 0px 4px 4px;
|
||||
border-radius:0px 0px 4px 4px;
|
||||
|
||||
-webkit-border-radius:0 0 4px 4px;
|
||||
-moz-border-radius:0 0 4px 4px;
|
||||
border-radius:0 0 4px 4px;
|
||||
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.9, white));
|
||||
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%);
|
||||
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%);
|
||||
background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 90%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
|
||||
background-image: linear-gradient(top, #eeeeee 0%,#ffffff 90%);
|
||||
}
|
||||
|
||||
@ -73,114 +85,156 @@ Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
||||
margin-right: 26px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
|
||||
-ms-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.select2-container .select2-choice abbr {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 26px;
|
||||
top: 8px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
font-size: 1px;
|
||||
background: url('select2.png') right top no-repeat;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
border:0;
|
||||
outline: 0;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
position: absolute;
|
||||
right: 26px;
|
||||
top: 8px;
|
||||
|
||||
font-size: 1px;
|
||||
text-decoration: none;
|
||||
|
||||
border: 0;
|
||||
background: url('select2.png') right top no-repeat;
|
||||
cursor: pointer;
|
||||
outline: 0;
|
||||
}
|
||||
.select2-container .select2-choice abbr:hover {
|
||||
background-position: right -11px;
|
||||
cursor: pointer;
|
||||
background-position: right -11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.select2-drop-mask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9998;
|
||||
background-color: #fff;
|
||||
opacity: 0;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; /* works in IE 8 */
|
||||
filter: "alpha(opacity=0)"; /* expected to work in IE 8 */
|
||||
filter: alpha(opacity=0); /* IE 4-7 */
|
||||
}
|
||||
|
||||
.select2-drop {
|
||||
width: 100%;
|
||||
margin-top:-1px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
top: 100%;
|
||||
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border: 1px solid #aaa;
|
||||
border-top: 0;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
-o-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
z-index: 9999;
|
||||
width:100%;
|
||||
margin-top:-1px;
|
||||
|
||||
-webkit-border-radius: 0 0 4px 4px;
|
||||
-moz-border-radius: 0 0 4px 4px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
-webkit-border-radius: 0 0 4px 4px;
|
||||
-moz-border-radius: 0 0 4px 4px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
|
||||
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.select2-drop.select2-drop-above {
|
||||
-webkit-border-radius: 4px 4px 0px 0px;
|
||||
-moz-border-radius: 4px 4px 0px 0px;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
margin-top:1px;
|
||||
margin-top: 1px;
|
||||
border-top: 1px solid #aaa;
|
||||
border-bottom: 0;
|
||||
|
||||
-webkit-border-radius: 4px 4px 0 0;
|
||||
-moz-border-radius: 4px 4px 0 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
|
||||
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
||||
-moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
||||
-o-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
||||
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
||||
-moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
||||
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.select2-container .select2-choice div {
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
|
||||
border-left: 1px solid #aaa;
|
||||
-webkit-border-radius: 0 4px 4px 0;
|
||||
-moz-border-radius: 0 4px 4px 0;
|
||||
border-radius: 0 4px 4px 0;
|
||||
-moz-background-clip: padding;
|
||||
-moz-border-radius: 0 4px 4px 0;
|
||||
border-radius: 0 4px 4px 0;
|
||||
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
|
||||
background: #ccc;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
|
||||
background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
||||
background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
||||
background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
|
||||
background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
|
||||
background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
|
||||
border-left: 1px solid #aaa;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.select2-container .select2-choice div b {
|
||||
background: url('select2.png') no-repeat 0 1px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('select2.png') no-repeat 0 1px;
|
||||
}
|
||||
|
||||
.select2-search {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
min-height: 26px;
|
||||
margin: 0;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
|
||||
position: relative;
|
||||
z-index: 10000;
|
||||
min-height: 26px;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.select2-search-hidden {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -10000px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -10000px;
|
||||
}
|
||||
|
||||
.select2-search input {
|
||||
width: 100%;
|
||||
height: auto !important;
|
||||
min-height: 26px;
|
||||
padding: 4px 20px 4px 5px;
|
||||
margin: 0;
|
||||
|
||||
outline: 0;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
|
||||
background: #fff url('select2.png') no-repeat 100% -22px;
|
||||
background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
||||
background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
||||
@ -188,92 +242,78 @@ Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
||||
background: url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
||||
background: url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
padding: 4px 20px 4px 5px;
|
||||
outline: 0;
|
||||
border: 1px solid #aaa;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
width:100%;
|
||||
margin:0;
|
||||
height:auto !important;
|
||||
min-height: 26px;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
}
|
||||
|
||||
.select2-drop.select2-drop-above .select2-search input
|
||||
{
|
||||
margin-top:4px;
|
||||
.select2-drop.select2-drop-above .select2-search input {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.select2-search input.select2-active {
|
||||
background: #fff url('spinner.gif') no-repeat 100%;
|
||||
background: url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
||||
background: url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
||||
background: url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
||||
background: url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
||||
background: url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
background: url('spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
background: #fff url('select2-spinner.gif') no-repeat 100%;
|
||||
background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
||||
background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
||||
background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
||||
background: url('select2-spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
||||
background: url('select2-spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
||||
}
|
||||
|
||||
|
||||
.select2-container-active .select2-choice,
|
||||
.select2-container-active .select2-choices {
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
border: 1px solid #5897fb;
|
||||
outline: none;
|
||||
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.select2-dropdown-open .select2-choice {
|
||||
border: 1px solid #aaa;
|
||||
border-bottom-color: transparent;
|
||||
-webkit-box-shadow: 0 1px 0 #fff inset;
|
||||
-moz-box-shadow : 0 1px 0 #fff inset;
|
||||
-o-box-shadow : 0 1px 0 #fff inset;
|
||||
box-shadow : 0 1px 0 #fff inset;
|
||||
background-color: #eee;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
||||
background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
|
||||
background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
|
||||
background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
||||
-webkit-border-bottom-left-radius : 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft : 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-left-radius : 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-color: transparent;
|
||||
-webkit-box-shadow: 0 1px 0 #fff inset;
|
||||
-moz-box-shadow: 0 1px 0 #fff inset;
|
||||
box-shadow: 0 1px 0 #fff inset;
|
||||
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
|
||||
background-color: #eee;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
||||
background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
|
||||
background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
|
||||
background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
||||
}
|
||||
|
||||
.select2-dropdown-open .select2-choice div {
|
||||
background: transparent;
|
||||
border-left: none;
|
||||
background: transparent;
|
||||
border-left: none;
|
||||
filter: none;
|
||||
}
|
||||
.select2-dropdown-open .select2-choice div b {
|
||||
background-position: -18px 1px;
|
||||
background-position: -18px 1px;
|
||||
}
|
||||
|
||||
/* results */
|
||||
.select2-results {
|
||||
margin: 4px 4px 4px 0;
|
||||
padding: 0 0 0 4px;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
max-height: 200px;
|
||||
max-height: 200px;
|
||||
padding: 0 0 0 4px;
|
||||
margin: 4px 4px 4px 0;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
.select2-results ul.select2-result-sub {
|
||||
margin: 0 0 0 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
|
||||
@ -285,40 +325,60 @@ Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
||||
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
|
||||
|
||||
.select2-results li {
|
||||
list-style: none;
|
||||
display: list-item;
|
||||
list-style: none;
|
||||
display: list-item;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.select2-results li.select2-result-with-children > .select2-result-label {
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.select2-results .select2-result-label {
|
||||
padding: 3px 7px 4px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
padding: 3px 7px 4px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
|
||||
min-height: 1em;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.select2-results .select2-highlighted {
|
||||
background: #3875d7;
|
||||
color: #fff;
|
||||
background: #3875d7;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.select2-results li em {
|
||||
background: #feffde;
|
||||
font-style: normal;
|
||||
background: #feffde;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.select2-results .select2-highlighted em {
|
||||
background: transparent;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.select2-results .select2-highlighted ul {
|
||||
background: white;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.select2-results .select2-no-results,
|
||||
.select2-results .select2-searching,
|
||||
.select2-results .select2-selection-limit {
|
||||
background: #f4f4f4;
|
||||
display: list-item;
|
||||
background: #f4f4f4;
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/*
|
||||
disabled look for already selected choices in the results dropdown
|
||||
disabled look for disabled choices in the results dropdown
|
||||
*/
|
||||
.select2-results .select2-disabled.select2-highlighted {
|
||||
color: #666;
|
||||
background: #f4f4f4;
|
||||
@ -330,18 +390,18 @@ disabled look for already selected choices in the results dropdown
|
||||
display: list-item;
|
||||
cursor: default;
|
||||
}
|
||||
*/
|
||||
.select2-results .select2-disabled {
|
||||
|
||||
.select2-results .select2-selected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-more-results.select2-active {
|
||||
background: #f4f4f4 url('spinner.gif') no-repeat 100%;
|
||||
background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
|
||||
}
|
||||
|
||||
.select2-more-results {
|
||||
background: #f4f4f4;
|
||||
display: list-item;
|
||||
background: #f4f4f4;
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* disabled styles */
|
||||
@ -359,25 +419,35 @@ disabled look for already selected choices in the results dropdown
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.select2-container.select2-container-disabled .select2-choice abbr {
|
||||
display: none
|
||||
}
|
||||
|
||||
|
||||
/* multiselect */
|
||||
|
||||
.select2-container-multi .select2-choices {
|
||||
height: auto !important;
|
||||
height: 1%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
|
||||
border: 1px solid #aaa;
|
||||
cursor: text;
|
||||
overflow: hidden;
|
||||
|
||||
background-color: #fff;
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
border: 1px solid #aaa;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
cursor: text;
|
||||
overflow: hidden;
|
||||
height: auto !important;
|
||||
height: 1%;
|
||||
position: relative;
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
}
|
||||
|
||||
.select2-locked {
|
||||
padding: 3px 5px 3px 5px !important;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-choices {
|
||||
@ -385,106 +455,116 @@ disabled look for already selected choices in the results dropdown
|
||||
}
|
||||
|
||||
.select2-container-multi.select2-container-active .select2-choices {
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
border: 1px solid #5897fb;
|
||||
outline: none;
|
||||
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
}
|
||||
.select2-container-multi .select2-choices li {
|
||||
float: left;
|
||||
list-style: none;
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
.select2-container-multi .select2-choices .select2-search-field {
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-choices .select2-search-field input {
|
||||
color: #666;
|
||||
background: transparent !important;
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
height: 15px;
|
||||
padding: 5px;
|
||||
margin: 1px 0;
|
||||
outline: 0;
|
||||
border: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow : none;
|
||||
-o-box-shadow : none;
|
||||
box-shadow : none;
|
||||
padding: 5px;
|
||||
margin: 1px 0;
|
||||
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
color: #666;
|
||||
outline: 0;
|
||||
border: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
||||
background: #fff url('spinner.gif') no-repeat 100% !important;
|
||||
background: #fff url('select2-spinner.gif') no-repeat 100% !important;
|
||||
}
|
||||
|
||||
.select2-default {
|
||||
color: #999 !important;
|
||||
color: #999 !important;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-choices .select2-search-choice {
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius : 3px;
|
||||
border-radius : 3px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
background-color: #e4e4e4;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
-moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
color: #333;
|
||||
border: 1px solid #aaaaaa;
|
||||
line-height: 13px;
|
||||
padding: 3px 5px 3px 18px;
|
||||
margin: 3px 0 3px 5px;
|
||||
position: relative;
|
||||
cursor: default;
|
||||
padding: 3px 5px 3px 18px;
|
||||
margin: 3px 0 3px 5px;
|
||||
position: relative;
|
||||
|
||||
line-height: 13px;
|
||||
color: #333;
|
||||
cursor: default;
|
||||
border: 1px solid #aaaaaa;
|
||||
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
|
||||
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
-moz-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
background-color: #e4e4e4;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
}
|
||||
.select2-container-multi .select2-choices .select2-search-choice span {
|
||||
cursor: default;
|
||||
cursor: default;
|
||||
}
|
||||
.select2-container-multi .select2-choices .select2-search-choice-focus {
|
||||
background: #d4d4d4;
|
||||
background: #d4d4d4;
|
||||
}
|
||||
|
||||
.select2-search-choice-close {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 4px;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
font-size: 1px;
|
||||
background: url('select2.png') right top no-repeat;
|
||||
outline: none;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 4px;
|
||||
|
||||
font-size: 1px;
|
||||
outline: none;
|
||||
background: url('select2.png') right top no-repeat;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-search-choice-close {
|
||||
left: 3px;
|
||||
left: 3px;
|
||||
}
|
||||
|
||||
|
||||
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
|
||||
background-position: right -11px;
|
||||
}
|
||||
.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
|
||||
background-position: right -11px;
|
||||
background-position: right -11px;
|
||||
}
|
||||
|
||||
/* disabled styles */
|
||||
|
||||
.select2-container-multi.select2-container-disabled .select2-choices{
|
||||
background-color: #f4f4f4;
|
||||
background-image: none;
|
||||
@ -493,10 +573,10 @@ disabled look for already selected choices in the results dropdown
|
||||
}
|
||||
|
||||
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
|
||||
padding: 3px 5px 3px 5px;
|
||||
border: 1px solid #ddd;
|
||||
background-image: none;
|
||||
background-color: #f4f4f4;
|
||||
border: 1px solid #ddd;
|
||||
padding: 3px 5px 3px 5px;
|
||||
}
|
||||
|
||||
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close {
|
||||
@ -504,21 +584,32 @@ disabled look for already selected choices in the results dropdown
|
||||
}
|
||||
/* end multiselect */
|
||||
|
||||
.select2-result-selectable .select2-match,
|
||||
.select2-result-unselectable .select2-result-selectable .select2-match { text-decoration: underline; }
|
||||
.select2-result-unselectable .select2-match { text-decoration: none; }
|
||||
|
||||
.select2-offscreen { position: absolute; left: -10000px; }
|
||||
.select2-result-selectable .select2-match,
|
||||
.select2-result-unselectable .select2-match {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.select2-offscreen {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
/* Retina-ize icons */
|
||||
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
|
||||
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
|
||||
background-image: url(select2x2.png) !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-size: 60px 40px !important;
|
||||
}
|
||||
.select2-search input {
|
||||
background-position: 100% -21px !important;
|
||||
}
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
|
||||
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
|
||||
background-image: url('select2x2.png') !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-size: 60px 40px !important;
|
||||
}
|
||||
.select2-search input {
|
||||
background-position: 100% -21px !important;
|
||||
}
|
||||
}
|
||||
|
36
src/inputs/select2/lib/select2.jquery.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "select2",
|
||||
"title": "Select2",
|
||||
"description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
|
||||
"keywords": [
|
||||
"select",
|
||||
"autocomplete",
|
||||
"typeahead",
|
||||
"dropdown",
|
||||
"multiselect",
|
||||
"tag",
|
||||
"tagging"
|
||||
],
|
||||
"version": "3.3.2",
|
||||
"author": {
|
||||
"name": "Igor Vaynberg",
|
||||
"url": "https://github.com/ivaynberg"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "Apache",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0"
|
||||
},
|
||||
{
|
||||
"type": "GPL v2",
|
||||
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
|
||||
}
|
||||
],
|
||||
"bugs": "https://github.com/ivaynberg/select2/issues",
|
||||
"homepage": "http://ivaynberg.github.com/select2",
|
||||
"docs": "http://ivaynberg.github.com/select2/",
|
||||
"download": "https://github.com/ivaynberg/select2/tags",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.4.6"
|
||||
}
|
||||
}
|
1247
src/inputs/select2/lib/select2.js
vendored
90
src/inputs/select2/lib/select2.min.js
vendored
15
src/inputs/select2/lib/select2_locale_de.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 German translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Keine Übereinstimmungen gefunden"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; },
|
||||
formatSelectionTooBig: function (limit) { return "Sie können nur " + limit + " Eintr" + (limit === 1 ? "ag" : "äge") + " auswählen"; },
|
||||
formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse..."; },
|
||||
formatSearching: function () { return "Suche..."; }
|
||||
});
|
||||
})(jQuery);
|
17
src/inputs/select2/lib/select2_locale_en.js.template
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Select2 <Language> translation.
|
||||
*
|
||||
* Author: Your Name <your@email>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "No matches found"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1 ? "" : "s"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Please enter " + n + " less character" + (n == 1? "" : "s"); },
|
||||
formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
|
||||
formatLoadMore: function (pageNumber) { return "Loading more results..."; },
|
||||
formatSearching: function () { return "Searching..."; }
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_es.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Spanish translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "No se encontraron resultados"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor adicione " + n + " caracter" + (n == 1? "" : "es"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor elimine " + n + " caracter" + (n == 1? "" : "es"); },
|
||||
formatSelectionTooBig: function (limit) { return "Solo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
|
||||
formatLoadMore: function (pageNumber) { return "Cargando más resultados..."; },
|
||||
formatSearching: function () { return "Buscando..."; }
|
||||
});
|
||||
})(jQuery);
|
43
src/inputs/select2/lib/select2_locale_eu.js
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Select2 Basque translation.
|
||||
*
|
||||
* Author: Julen Ruiz Aizpuru <julenx at gmail dot com>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () {
|
||||
return "Ez da bat datorrenik aurkitu";
|
||||
},
|
||||
formatInputTooShort: function (input, min) {
|
||||
var n = min - input.length;
|
||||
if (n === 1) {
|
||||
return "Idatzi karaktere bat gehiago";
|
||||
} else {
|
||||
return "Idatzi " + n + " karaktere gehiago";
|
||||
}
|
||||
},
|
||||
formatInputTooLong: function (input, max) {
|
||||
var n = input.length - max;
|
||||
if (n === 1) {
|
||||
return "Idatzi karaktere bat gutxiago";
|
||||
} else {
|
||||
return "Idatzi " + n + " karaktere gutxiago";
|
||||
}
|
||||
},
|
||||
formatSelectionTooBig: function (limit) {
|
||||
if (limit === 1 ) {
|
||||
return "Elementu bakarra hauta dezakezu";
|
||||
} else {
|
||||
return limit + " elementu hauta ditzakezu soilik";
|
||||
}
|
||||
},
|
||||
formatLoadMore: function (pageNumber) {
|
||||
return "Emaitza gehiago kargatzen...";
|
||||
},
|
||||
formatSearching: function () {
|
||||
return "Bilatzen...";
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_fr.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 French translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Aucun résultat trouvé"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Merci de saisir " + n + " caractère" + (n == 1? "" : "s") + " de plus"; },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Merci de saisir " + n + " caractère" + (n == 1? "" : "s") + " de moins"; },
|
||||
formatSelectionTooBig: function (limit) { return "Vous pouvez seulement sélectionner " + limit + " élément" + (limit == 1 ? "" : "s"); },
|
||||
formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires..."; },
|
||||
formatSearching: function () { return "Recherche en cours..."; }
|
||||
});
|
||||
})(jQuery);
|
42
src/inputs/select2/lib/select2_locale_hr.js
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Select2 Croatian translation.
|
||||
*
|
||||
* Author: Edi Modrić <edi.modric@gmail.com>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var specialNumbers = {
|
||||
1: function(n) { return (n % 100 != 11 ? "znak" : "znakova"); },
|
||||
2: function(n) { return (n % 100 != 12 ? "znaka" : "znakova"); },
|
||||
3: function(n) { return (n % 100 != 13 ? "znaka" : "znakova"); },
|
||||
4: function(n) { return (n % 100 != 14 ? "znaka" : "znakova"); }
|
||||
};
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Nema rezultata"; },
|
||||
formatInputTooShort: function (input, min) {
|
||||
var n = min - input.length;
|
||||
var nMod10 = n % 10;
|
||||
|
||||
if (nMod10 > 0 && nMod10 < 5) {
|
||||
return "Unesite još " + n + " " + specialNumbers[nMod10](n);
|
||||
}
|
||||
|
||||
return "Unesite još " + n + " znakova";
|
||||
},
|
||||
formatInputTooLong: function (input, max) {
|
||||
var n = input.length - max;
|
||||
var nMod10 = n % 10;
|
||||
|
||||
if (nMod10 > 0 && nMod10 < 5) {
|
||||
return "Unesite " + n + " " + specialNumbers[nMod10](n) + " manje";
|
||||
}
|
||||
|
||||
return "Unesite " + n + " znakova manje";
|
||||
},
|
||||
formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; },
|
||||
formatLoadMore: function (pageNumber) { return "Učitavanje rezultata..."; },
|
||||
formatSearching: function () { return "Pretraga..."; }
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_hu.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Hungarian translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Nincs találat."; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " kerekterrel több mint kellene."; },
|
||||
formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; },
|
||||
formatLoadMore: function (pageNumber) { return "Töltés..."; },
|
||||
formatSearching: function () { return "Keresés..."; }
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_it.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Italian translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Nessuna corrispondenza trovata"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; },
|
||||
formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); },
|
||||
formatLoadMore: function (pageNumber) { return "Caricamento in corso..."; },
|
||||
formatSearching: function () { return "Ricerca..."; }
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_nl.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Dutch translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Geen resultaten gevonden"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " meer in"; },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " minder in"; },
|
||||
formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; },
|
||||
formatLoadMore: function (pageNumber) { return "Meer resultaten laden..."; },
|
||||
formatSearching: function () { return "Zoeken..."; },
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_pt-BR.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Brazilian Portuguese translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Informe " + n + " caracter" + (n == 1? "" : "es"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); },
|
||||
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
|
||||
formatLoadMore: function (pageNumber) { return "Carregando mais resultados..."; },
|
||||
formatSearching: function () { return "Buscando..."; }
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_pt-PT.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Portuguese (Portugal) translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " caracter" + (n == 1 ? "" : "es"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1 ? "" : "es"); },
|
||||
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
|
||||
formatLoadMore: function (pageNumber) { return "A carregar mais resultados..."; },
|
||||
formatSearching: function () { return "A pesquisar..."; }
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_ro.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Romanian translation.
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Nu a fost găsit nimic"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vă rugăm să introduceți incă " + n + " caracter" + (n == 1 ? "" : "e"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vă rugăm să introduceți mai puțin de " + n + " caracter" + (n == 1? "" : "e"); },
|
||||
formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); },
|
||||
formatLoadMore: function (pageNumber) { return "Se încarcă..."; },
|
||||
formatSearching: function () { return "Căutare..."; }
|
||||
});
|
||||
})(jQuery);
|
15
src/inputs/select2/lib/select2_locale_ru.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Select2 Russian translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Совпадений не найдено"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Пожалуйста, введите еще " + n + " символ" + (n == 1 ? "" : ((n > 1)&&(n < 5) ? "а" : "ов")); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Пожалуйста, введите на " + n + " символ" + (n == 1 ? "" : ((n > 1)&&(n < 5)? "а" : "ов")) + " меньше"; },
|
||||
formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit == 1 ? "" : ((limit > 1)&&(limit < 5)? "а" : "ов")); },
|
||||
formatLoadMore: function (pageNumber) { return "Загрузка данных..."; },
|
||||
formatSearching: function () { return "Поиск..."; }
|
||||
});
|
||||
})(jQuery);
|
48
src/inputs/select2/lib/select2_locale_sk.js
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Select2 Slovak translation.
|
||||
*
|
||||
* Author: David Vallner <david@vallner.net>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
// use text for the numbers 2 through 4
|
||||
var smallNumbers = {
|
||||
2: function(masc) { return (masc ? "dva" : "dve"); },
|
||||
3: function() { return "tri"; },
|
||||
4: function() { return "štyri"; }
|
||||
}
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Nenašli sa žiadne položky"; },
|
||||
formatInputTooShort: function (input, min) {
|
||||
var n = min - input.length;
|
||||
if (n == 1) {
|
||||
return "Prosím zadajte ešte jeden znak";
|
||||
} else if (n <= 4) {
|
||||
return "Prosím zadajte ešte ďalšie "+smallNumbers[n](true)+" znaky";
|
||||
} else {
|
||||
return "Prosím zadajte ešte ďalších "+n+" znakov";
|
||||
}
|
||||
},
|
||||
formatInputTooLong: function (input, max) {
|
||||
var n = input.length - max;
|
||||
if (n == 1) {
|
||||
return "Prosím zadajte o jeden znak menej";
|
||||
} else if (n <= 4) {
|
||||
return "Prosím zadajte o "+smallNumbers[n](true)+" znaky menej";
|
||||
} else {
|
||||
return "Prosím zadajte o "+n+" znakov menej";
|
||||
}
|
||||
},
|
||||
formatSelectionTooBig: function (limit) {
|
||||
if (limit == 1) {
|
||||
return "Môžete zvoliť len jednu položku";
|
||||
} else if (limit <= 4) {
|
||||
return "Môžete zvoliť najviac "+smallNumbers[limit](false)+" položky";
|
||||
} else {
|
||||
return "Môžete zvoliť najviac "+limit+" položiek";
|
||||
}
|
||||
},
|
||||
formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky..."; },
|
||||
formatSearching: function () { return "Vyhľadávanie..."; }
|
||||
});
|
||||
})(jQuery);
|
17
src/inputs/select2/lib/select2_locale_sv.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Select2 Swedish translation.
|
||||
*
|
||||
* Author: Jens Rantil <jens.rantil@telavox.com>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Inga träffar"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; },
|
||||
formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; },
|
||||
formatLoadMore: function (pageNumber) { return "Laddar fler resultat..."; },
|
||||
formatSearching: function () { return "Söker..."; }
|
||||
});
|
||||
})(jQuery);
|
17
src/inputs/select2/lib/select2_locale_tr.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Select2 Turkish translation.
|
||||
*
|
||||
* Author: Salim KAYABAŞI <salim.kayabasi@gmail.com>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Sonuç bulunamadı"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; },
|
||||
formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; },
|
||||
formatLoadMore: function (pageNumber) { return "Daha fazla ..."; },
|
||||
formatSearching: function () { return "Aranıyor..."; }
|
||||
});
|
||||
})(jQuery);
|
17
src/inputs/select2/lib/select2_locale_ua.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Select2 <Language> translation.
|
||||
*
|
||||
* Author: bigmihail <bigmihail@bigmir.net>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "Нічого не знайдено"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length, s = ["", "и", "ів"], p = [2,0,1,1,1,2]; return "Введіть буль ласка ще " + n + " символ" + s[ (n%100>4 && n%100<=20)? 2 : p[Math.min(n%10, 5)] ]; },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max, s = ["", "и", "ів"], p = [2,0,1,1,1,2]; return "Введіть буль ласка на " + n + " символ" + s[ (n%100>4 && n%100<=20)? 2 : p[Math.min(n%10, 5)] ] + " менше"; },
|
||||
formatSelectionTooBig: function (limit) {var s = ["", "и", "ів"], p = [2,0,1,1,1,2]; return "Ви можете вибрати лише " + limit + " елемент" + s[ (limit%100>4 && limit%100<=20)? 2 : p[Math.min(limit%10, 5)] ]; },
|
||||
formatLoadMore: function (pageNumber) { return "Завантаження даних..."; },
|
||||
formatSearching: function () { return "Пошук..."; }
|
||||
});
|
||||
})(jQuery);
|
14
src/inputs/select2/lib/select2_locale_zh-CN.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Select2 Chinese translation
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "没有找到匹配项"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";},
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";},
|
||||
formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; },
|
||||
formatLoadMore: function (pageNumber) { return "加载结果中..."; },
|
||||
formatSearching: function () { return "搜索中..."; }
|
||||
});
|
||||
})(jQuery);
|
9
src/inputs/select2/select2.js
vendored
@ -6,6 +6,10 @@ You should manually include select2 distributive:
|
||||
<link href="select2/select2.css" rel="stylesheet" type="text/css"></link>
|
||||
<script src="select2/select2.js"></script>
|
||||
|
||||
For make it **Bootstrap-styled** you can use css from [here](https://github.com/t0m/select2-bootstrap-css):
|
||||
|
||||
<link href="select2-bootstrap.css" rel="stylesheet" type="text/css"></link>
|
||||
|
||||
**Note:** currently `ajax` source for select2 is not supported, as it's not possible to load it in closed select2 state.
|
||||
The solution is to load source manually and assign statically.
|
||||
|
||||
@ -31,7 +35,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Constructor = function (options) {
|
||||
this.init('select2', options, Constructor.defaults);
|
||||
|
||||
@ -232,4 +237,4 @@ $(function(){
|
||||
|
||||
$.fn.editabletypes.select2 = Constructor;
|
||||
|
||||
}(window.jQuery));
|
||||
}(window.jQuery));
|
||||
|
@ -16,6 +16,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var Text = function (options) {
|
||||
this.init('text', options, Text.defaults);
|
||||
};
|
||||
@ -65,18 +67,17 @@ $(function(){
|
||||
},
|
||||
|
||||
postrender: function() {
|
||||
/*
|
||||
//now `clear` is positioned via css
|
||||
if(this.$clear) {
|
||||
//can position clear button only here, when form is shown and height can be calculated
|
||||
var h = this.$input.outerHeight() || 20,
|
||||
// var h = this.$input.outerHeight(true) || 20,
|
||||
var h = this.$clear.parent().height(),
|
||||
delta = (h - this.$clear.height()) / 2;
|
||||
|
||||
//workaround for plain-popup
|
||||
if(delta < 3) {
|
||||
delta = 3;
|
||||
}
|
||||
|
||||
this.$clear.css({bottom: delta, right: delta});
|
||||
}
|
||||
//this.$clear.css({bottom: delta, right: delta});
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
//show / hide clear button
|
||||
|
@ -17,7 +17,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Textarea = function (options) {
|
||||
this.init('textarea', options, Textarea.defaults);
|
||||
};
|
||||
|
@ -30,7 +30,8 @@ $(function(){
|
||||
</script>
|
||||
**/
|
||||
(function ($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Constructor = function (options) {
|
||||
this.init('typeahead', options, Constructor.defaults);
|
||||
|
||||
|
1109
test/libs/bootstrap231/css/bootstrap-responsive.css
vendored
Normal file
9
test/libs/bootstrap231/css/bootstrap-responsive.min.css
vendored
Normal file
6158
test/libs/bootstrap231/css/bootstrap.css
vendored
Normal file
9
test/libs/bootstrap231/css/bootstrap.min.css
vendored
Normal file
BIN
test/libs/bootstrap231/img/glyphicons-halflings-white.png
Normal file
After ![]() (image error) Size: 8.6 KiB |
BIN
test/libs/bootstrap231/img/glyphicons-halflings.png
Normal file
After ![]() (image error) Size: 12 KiB |
2276
test/libs/bootstrap231/js/bootstrap.js
vendored
Normal file
6
test/libs/bootstrap231/js/bootstrap.min.js
vendored
Normal file
After ![]() (image error) Size: 1.7 KiB |
After ![]() (image error) Size: 212 B |
BIN
test/libs/jquery-ui-1.10.2.custom/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png
Normal file
After ![]() (image error) Size: 206 B |
BIN
test/libs/jquery-ui-1.10.2.custom/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png
Normal file
After ![]() (image error) Size: 336 B |