Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orphan icon below table when no deleteAction #822

Closed
ghost opened this issue Aug 7, 2013 · 5 comments
Closed

Orphan icon below table when no deleteAction #822

ghost opened this issue Aug 7, 2013 · 5 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Aug 7, 2013

I'm using jTable to filter and display rows from a huge table (using Ajax/JSON at the back end) and for that purpose, it works great.

Because I am only displaying data, I only have a listAction, and no createAction, updateAction or deleteAction. Not having a deleteAction seems to create an issue. A small icon appears in an otherwise blank area some way below the table. According to the browser it's this:

<div class="ui-dialog-contain ui-overlay-shadow ui-corner-all" role="dialog">
      <p>
        <span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>
        <span class="jtable-delete-confirm-message"></span>
    </p>
</div>

Specifically, the ui-icon line. I've tried setting "deleteConfirmation: false" in the jTable, but that doesn't make any difference, and the icon still appears.

Obviously this is a bug, but is there any way of working around it until it's hopefully fixed?

@ghost
Copy link
Author

ghost commented Aug 7, 2013

I'm answering my own question here after a bit of digging in the jTable source. I believe what's necessary is to add a check at line 2615 so that it now looks like this:

        _createDeleteDialogDiv: function () {
            var self = this;

            //Check if deleteAction is supplied
            if (!self.options.actions.deleteAction) {
                return;
            }

            //Create div element for delete confirmation dialog

This seems to work for me.

@ghost ghost closed this as completed Aug 7, 2013
@ghost ghost reopened this Aug 7, 2013
@hikalkan
Copy link
Member

hikalkan commented Aug 7, 2013

Thank you. Actually, it would not be a problem since it's hidden. But I will chech and fix it if there is an issue. Thanks again.

@ghost
Copy link
Author

ghost commented Aug 7, 2013

Thanks.

Also, many thanks for the awesome jTable which has saved me a lot of work :)

@hikalkan
Copy link
Member

Fixed it as you offered. Thanks.

hikalkan added a commit that referenced this issue Sep 21, 2013
Bugfixes (#161, #254, #357, #570, #822) and localizations.
@ghost
Copy link
Author

ghost commented Sep 23, 2013

Great, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant