Giter VIP home page Giter VIP logo

jquery-preview's People

Contributors

screeley avatar tbaba avatar tboetig avatar trevorburnham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-preview's Issues

Add ignore rules for autogenerated files

The build process (watch.py) generates which compiles and minifies makes merges and pull requests unnecessarily complicated. You should consider creating ignore rules for the following files and deploy compiled versions of the files to some alternate location for the demo site.

jquery.preview.js
jquery.preview.min.js
jquery.preview.full.js
jquery.preview.full.min.js

Preview not working?

I'm trying to use even the most basic code here...and preview is not triggering at all.

When I tried the on('loading') and on('loaded') as a test, and the field stayed disabled, indicating no communication with jquery preview.

I also tried the basic version below, and it comes back as "You Selected: undefined".

I know all the libraries are loaded...Does this have anything to do with localhost?

The old version of jquery preview was working well for me (I have it live on the web). But this new one isn't, and can't figure out why.

    <form id="preview_form" class="form-vertical" method="post" action=".">
      <textarea class="holler" name="status" id="id_status" ></textarea>

      <!-- Placeholder that tells Preview where to put the selector-->
      <div class="selector-wrapper"></div>
      <div class="actions">
        <input id="id_submit" type="submit" class="button" value="Share"/>
      </div>
    </form>

<script>
  $('.holler').preview({key: 'my_code_here', // Sign up for a key: http://embed.ly/pricing
                            });
  $('form').on('submit', function(){
    alert('You Selected: ' + $(this).find('.holler').data('preview').title);
    return false;
  });
</script>

Unnecessary encoding/decoding of input values?

I noticed the data is being encoded a number of times before being decoded right before being submitted. As best as I can tell this is completely unnecessary, and it causes at least one issue that I've identified so far.

When the value for obj.safe is encoded it becomes a string "true" or "false", which, when decoded, remains a string instead of becoming one of the standard boolean values (true/1 or false/0). This means the server code needs to be written in a way that expects this field to be strings and not a boolean.

Is there a reason why this encoding/decoding is happening?

8e26d39dd9:/src/preview.js:185 Preview.Preview._callback():

v = obj.hasOwnProperty(n) && obj[n] ? encodeURIComponent(obj[n]): '';

8e26d39dd9::src/preview.js:313 Preview.Preview._submit():

data[n] = decodeURIComponent($(e).val());

After closing preview in selector-wrapper it's not possible to enter new preview

We are using preview from embedly , everything works fine except one issue. If I put url and trigger preview and afterwards I close the preview before submitting the form to put a new url the preview is not called again.

I have tested this also in the demo in http://embedly.github.io/jquery-preview/demo/# and it behaves the same. I put url to the "now share it" form , click on "share it" button . Then I close the preview , put new url to the form and clicking "share it" doesn't do anything ..

Thanks,

Jorge

Form submitted when using rails data-remote

Hi guys,

I'm having this issue with rails where the form gets submitted twice when using data-remote (rails remote form)

I manage to get it working by just removing this line (jquery.preview.js:1083)

  //Bind Submit
  //this.form.bind('submit', this._submit);  // submits twice when data-remote is present

Editable preview

Before I do a deep dive into the code, I wanted to check if there's a supported way to make the fields editable off the bat (instead of click to edit)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.