|
@@ -1774,7 +1774,7 @@ class TableAjax extends ViewAjax {
|
|
|
$('<input type="hidden" name="col" value="">').appendTo(iebBody);
|
|
$('<input type="hidden" name="col" value="">').appendTo(iebBody);
|
|
|
$('<div class="inlineEditBox-cnt"></div>').appendTo(iebBody);
|
|
$('<div class="inlineEditBox-cnt"></div>').appendTo(iebBody);
|
|
|
var iebFoot = $('<div class="modal-footer"></div>').appendTo(frmInlineEdit);
|
|
var iebFoot = $('<div class="modal-footer"></div>').appendTo(frmInlineEdit);
|
|
|
- $('<button class="btn" data-dismiss="modal" aria-hidden="true">Zamknij</button>').appendTo(iebFoot);
|
|
|
|
|
|
|
+ $('<button class="btn btn-close" data-dismiss="modal" aria-hidden="true">Zamknij</button>').appendTo(iebFoot);
|
|
|
var iebBtnSave = $('<input type="submit" value="Zapisz" class="btn btn-primary btn-save">').appendTo(iebFoot);
|
|
var iebBtnSave = $('<input type="submit" value="Zapisz" class="btn btn-primary btn-save">').appendTo(iebFoot);
|
|
|
|
|
|
|
|
frmInlineEdit.on('submit', function() {
|
|
frmInlineEdit.on('submit', function() {
|
|
@@ -2891,9 +2891,7 @@ class TableAjax extends ViewAjax {
|
|
|
inlineEditBox$Node.find('textarea').autosize();
|
|
inlineEditBox$Node.find('textarea').autosize();
|
|
|
|
|
|
|
|
var fld = inlineEditBox$Node.find('input[id^="f"]');
|
|
var fld = inlineEditBox$Node.find('input[id^="f"]');
|
|
|
- if (fld && !fld.hasClass('se_type-date')) {
|
|
|
|
|
- fld.focus();
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if (fld.length > 0 && !fld.hasClass('se_type-date')) {
|
|
|
fld.keydown(function(event) {
|
|
fld.keydown(function(event) {
|
|
|
if (event.which == 13) {
|
|
if (event.which == 13) {
|
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
@@ -2901,6 +2899,27 @@ class TableAjax extends ViewAjax {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ (function setFocusAtFirstInlineEditFormFld(modal$node){
|
|
|
|
|
+ var fld, dbg = false;
|
|
|
|
|
+ if(dbg)console.log('focus...');
|
|
|
|
|
+ fld = modal$node.find('input[name^="f"]:first');
|
|
|
|
|
+ if (fld.length > 0 && !fld.hasClass('se_type-date')) {
|
|
|
|
|
+ if(dbg)console.log('set focus to first input element');
|
|
|
|
|
+ fld.focus(); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ fld = modal$node.find('select[name^="f"]:first');
|
|
|
|
|
+ if (fld.length) {
|
|
|
|
|
+ if (fld.get(0).selectize) {
|
|
|
|
|
+ if(dbg)console.log('set focus to first typepecial element');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if(dbg)console.log('set focus to first select element');
|
|
|
|
|
+ fld.focus(); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if(dbg)console.log('set focus to close btn');
|
|
|
|
|
+ modal$node.find('.btn-close').focus();
|
|
|
|
|
+ })(inlineEditBox$Node);
|
|
|
},
|
|
},
|
|
|
error: function(err) {
|
|
error: function(err) {
|
|
|
if (priv.options.debug) console.log('err');
|
|
if (priv.options.debug) console.log('err');
|