Is it possible to have a jeditable popup instead of the built-in

I have an html table. there are many columns to fit, many columns show images for representing data. I use jeditable so that users can click on the image and select from the drop-down list or enter text in the text field and update this field (which then displays the corresponding image in the returned content (works fine)

One problem is that some of the column widths are very small, so when you click on the image, you get a text box, but its path is small (as the table layout limits it). you don’t have enough space for the text field (its width is about 1/8 inch), I would like the text box to pop up above the table (maybe in a small dialog box or something else), so I have more width so that someone could enter longer text.

any suggestions?

+3
source share
3 answers

The cssclass or jeditable style options can do what you want - if the form created by jeditable has absolute positioning, the table will not expand.

, css, , jquery- - ,

var form = $('<form />');

html . , , , , , , .

+2

DIV, ,

- ( , )

<div class="jeditable" id="firstcol">jEditable field</div>
<th><span class="jeditable-activate">Edit me</span></td>

jQuery:

$('.jeditable-activate').click(function() {
    $(this).prev().show().click();
});
0

jEditable , ​​ "auto" ( ), "none" . , - :

  $(".click").editable(url, {
      indicator : "<img src='img/indicator.gif'>",
      tooltip   : "Click to edit...",
      width     : 400,
      style  : "inherit"
  });

You can adapt the editing width to suit your needs. This, of course, will expand the table, but I do not see a problem in this. I believe that this is preferable if you have a dialog box, since after that everything that edits in place is all.

0
source

Source: https://habr.com/ru/post/1726688/


All Articles