This commit is contained in:
vitalets
2012-11-09 12:58:42 +04:00
commit ccdff0ee51
160 changed files with 83260 additions and 0 deletions
.gitignoreCHANGELOG.txtLICENSE-GPLLICENSE-MITREADME.mdgrunt.js
libs
bootstrap204
bootstrap211
bootstrap221
jquery-ui-1.9.1.custom
jquery-ui-datepicker
jquery
mockjax
poshytip
qunit
makezippackage.json
src
test

@ -0,0 +1,60 @@
/**
* Editable Inline
* ---------------------
*/
(function ($) {
//extend methods
$.extend($.fn.editableContainer.Constructor.prototype, {
containerName: 'editableform',
innerCss: null,
initContainer: function(){
//no init for container
//only convert anim to miliseconds
if(!this.options.anim) {
this.options.anim = 0;
}
},
tip: function() {
return this.$form;
},
show: function () {
this.$element.hide();
if(this.$form) {
this.$form.remove();
}
this.initForm();
this.tip().addClass('editable-container').addClass('editable-inline');
this.$form.insertAfter(this.$element);
this.$form.show(this.options.anim);
this.$form.editableform('render');
},
hide: function () {
this.$form.hide(this.options.anim, $.proxy(function() {
this.$element.show();
//return focus on element
if (this.options.enablefocus) {
this.$element.focus();
}
}, this));
},
destroy: function() {
this.tip().remove();
}
});
//defaults
$.fn.editableContainer.defaults = $.extend({}, $.fn.editableContainer.defaults, {
anim: 'fast',
enablefocus: false
});
}(window.jQuery));