migrate to grunt 0.4
This commit is contained in:
Gruntfile.js
dist
CHANGELOG.txt
package.jsonbootstrap-editable
css
img
src
js
inputs-ext
src
inputs-ext
jquery-editable
css
img
src
jquery-ui-datepicker
css
redmond
images
src
inputs
dateui
jquery-ui-datepicker
css
redmond
images
animated-overlay.gifui-bg_flat_0_aaaaaa_40x100.pngui-bg_flat_55_fbec88_40x100.pngui-bg_glass_75_d0e5f5_1x400.pngui-bg_glass_85_dfeffc_1x400.pngui-bg_glass_95_fef1ec_1x400.pngui-bg_gloss-wave_55_5c9ccc_500x100.pngui-bg_inset-hard_100_f5f8f9_1x100.pngui-bg_inset-hard_100_fcfdfd_1x100.pngui-icons_217bc0_256x240.pngui-icons_2e83ff_256x240.pngui-icons_469bdd_256x240.pngui-icons_6da8d5_256x240.pngui-icons_cd0a0a_256x240.pngui-icons_d8e7f3_256x240.pngui-icons_f9bd01_256x240.png
src
inputs
dateui
jquery-ui-datepicker
js
src
inputs
dateui
jquery-ui-datepicker
js
jqueryui-editable
src/containers
test
39
dist/jqueryui-editable/js/jqueryui-editable.js
vendored
39
dist/jqueryui-editable/js/jqueryui-editable.js
vendored
@ -2,7 +2,6 @@
|
||||
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
|
||||
* http://github.com/vitalets/x-editable
|
||||
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
|
||||
|
||||
/**
|
||||
Form with single input element, two buttons and two states: normal/loading.
|
||||
Applied as jQuery method to DIV tag (not to form tag!). This is because form can be in loading state when spinner shown.
|
||||
@ -33,6 +32,9 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
//set initial value
|
||||
//todo: may be add check: typeof str === 'string' ?
|
||||
this.value = this.input.str2value(this.options.value);
|
||||
|
||||
//prerender: get input.$input
|
||||
this.input.prerender();
|
||||
},
|
||||
initTemplate: function() {
|
||||
this.$form = $($.fn.editableform.template);
|
||||
@ -80,9 +82,8 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
|
||||
this.initInput();
|
||||
|
||||
//append input to form
|
||||
this.input.prerender();
|
||||
this.$form.find('div.editable-input').append(this.input.$tpl);
|
||||
|
||||
|
||||
//append form to container
|
||||
this.$div.append(this.$form);
|
||||
|
||||
@ -620,6 +621,9 @@ 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';
|
||||
|
||||
//engine
|
||||
$.fn.editableform.engine = 'jqeury';
|
||||
}(window.jQuery));
|
||||
|
||||
/**
|
||||
@ -898,6 +902,8 @@ Applied as jQuery method.
|
||||
containerDataName: null, //object name in element's .data()
|
||||
innerCss: null, //tbd in child class
|
||||
containerClass: 'editable-container editable-popup', //css class applied to container element
|
||||
defaults: {}, //container itself defaults
|
||||
|
||||
init: function(element, options) {
|
||||
this.$element = $(element);
|
||||
//since 1.4.1 container do not use data-* directly as they already merged into options.
|
||||
@ -975,10 +981,9 @@ Applied as jQuery method.
|
||||
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) {
|
||||
if(k in cDef) {
|
||||
if(k in this.defaults) {
|
||||
this.containerOptions[k] = this.options[k];
|
||||
} else {
|
||||
this.formOptions[k] = this.options[k];
|
||||
@ -2249,7 +2254,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
@since 1.4.5
|
||||
@default #FFFF80
|
||||
**/
|
||||
highlight: '#FFFF80'
|
||||
highlight: '#FFFF80'
|
||||
};
|
||||
|
||||
}(window.jQuery));
|
||||
@ -2415,7 +2420,7 @@ To create your own input you can inherit from this class.
|
||||
},
|
||||
|
||||
// -------- helper functions --------
|
||||
setClass: function() {
|
||||
setClass: function() {
|
||||
if(this.options.inputclass) {
|
||||
this.$input.addClass(this.options.inputclass);
|
||||
}
|
||||
@ -2447,9 +2452,9 @@ To create your own input you can inherit from this class.
|
||||
|
||||
@property inputclass
|
||||
@type string
|
||||
@default input-medium
|
||||
@default null
|
||||
**/
|
||||
inputclass: 'input-medium',
|
||||
inputclass: null,
|
||||
//scope for external methods (e.g. source defined as function)
|
||||
//for internal use only
|
||||
scope: null,
|
||||
@ -3817,7 +3822,7 @@ $(function(){
|
||||
@type string
|
||||
@default ', '
|
||||
**/
|
||||
viewseparator: ', '
|
||||
viewseparator: ', '
|
||||
});
|
||||
|
||||
$.fn.editabletypes.select2 = Constructor;
|
||||
@ -4343,7 +4348,14 @@ $(function(){
|
||||
$.extend(Constructor.prototype, {
|
||||
render: function () {
|
||||
this.$input.combodate(this.options.combodate);
|
||||
|
||||
if($.fn.editableform.engine === 'bs3') {
|
||||
this.$input.siblings().find('select').addClass('form-control');
|
||||
}
|
||||
|
||||
if(this.options.inputclass) {
|
||||
this.$input.siblings().find('select').addClass(this.options.inputclass);
|
||||
}
|
||||
//"clear" link
|
||||
/*
|
||||
if(this.options.clear) {
|
||||
@ -4495,6 +4507,8 @@ Editableform based on jQuery UI
|
||||
//error classes
|
||||
$.fn.editableform.errorGroupClass = null;
|
||||
$.fn.editableform.errorBlockClass = 'ui-state-error';
|
||||
//engine
|
||||
$.fn.editableform.engine = 'jqeury-ui';
|
||||
|
||||
}(window.jQuery));
|
||||
/**
|
||||
@ -4511,6 +4525,7 @@ Editableform based on jQuery UI
|
||||
//object name in element's .data()
|
||||
containerDataName: 'ui-tooltip',
|
||||
innerCss: '.ui-tooltip-content',
|
||||
defaults: $.ui.tooltip.prototype.options,
|
||||
|
||||
//split options on containerOptions and formOptions
|
||||
splitOptions: function() {
|
||||
@ -4522,10 +4537,10 @@ Editableform based on jQuery UI
|
||||
$.error('Please use jQueryUI with "tooltip" widget! http://jqueryui.com/download');
|
||||
return;
|
||||
}
|
||||
|
||||
//defaults for tooltip
|
||||
var cDef = $.ui[this.containerName].prototype.options;
|
||||
for(var k in this.options) {
|
||||
if(k in cDef) {
|
||||
if(k in this.defaults) {
|
||||
this.containerOptions[k] = this.options[k];
|
||||
} else {
|
||||
this.formOptions[k] = this.options[k];
|
||||
|
Reference in New Issue
Block a user