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

Savable not working #44

Closed
spacetraveller opened this issue Sep 4, 2018 · 1 comment
Closed

Savable not working #44

spacetraveller opened this issue Sep 4, 2018 · 1 comment

Comments

@spacetraveller
Copy link

spacetraveller commented Sep 4, 2018

For some reason, the post it notes are not saving to local storage. If "savable: true" is set, then whenever attempt to create a new sticky, nothing happens and there is no feedback to the console with an error.

function createSticky(evt) {
            $.PostItAll.new({
                content : "",
                width: 260,
                height: 260,
                posX: evt.pageX,
                posY: evt.pageY + 20,
                features: {
                    savable: true,
                    resizable: true
                }
            });

        }

If you set "savable: false", then the sticky appears.

@txusko
Copy link
Owner

txusko commented Sep 15, 2018

Your code seems to be ok and works fine. I've just checked and notes appear.
Maybe you forget to load the notes when the page it's loaded? $.PostItAll.load();.
http://localhost/~txusko/PostItAll/plugin.html#doc_save

This is the code I tested:

<script>
      function createSticky(evt) {
          $.PostItAll.new({
              content : "",
              width: 260,
              height: 260,
              posX: evt.pageX,
              posY: evt.pageY + 20,
              features: {
                  savable: true,
                  resizable: true
              }
          });

      }
      $(document).ready(function() {
        $.PostItAll.load();
        $('#idNew').click(function(e) {
            createSticky(e);
            e.preventDefault();
        });
      });
</script>

Or maybe it's something wrong with your configuration or your environement? You can try to change savable global configuration:

$.fn.postitall.globals.savable = true;

@txusko txusko closed this as completed Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants