add wysi input, refactor all inputs to append $tpl to form before render()

This commit is contained in:
vitalets
2013-01-07 01:03:09 +04:00
parent cf9b9dea9d
commit ee79d5cec4
23 changed files with 10223 additions and 198 deletions

@ -45,15 +45,22 @@ Applied as jQuery method.
//close containers when click outside
$(document).on('click.editable', function(e) {
var $target = $(e.target);
var $target = $(e.target), i,
exclude_classes = ['.editable-container',
'.ui-datepicker-header',
'.modal-backdrop',
'.bootstrap-wysihtml5-insert-image-modal',
'.bootstrap-wysihtml5-insert-link-modal'];
//if click inside some editableContainer --> no nothing
if($target.is('.editable-container') || $target.parents('.editable-container').length || $target.parents('.ui-datepicker-header').length) {
return;
} else {
//close all open containers (except one)
Popup.prototype.closeOthers(e.target);
//if click inside one of exclude classes --> no nothing
for(i=0; i<exclude_classes.length; i++) {
if($target.is(exclude_classes[i]) || $target.parents(exclude_classes[i]).length) {
return;
}
}
//close all open containers (except one)
Popup.prototype.closeOthers(e.target);
});
$(document).data('editable-handlers-attached', true);