Giter Site home page Giter Site logo

baldrickjs's People

Contributors

davidcramer avatar richlloydmiles avatar rjmcguire avatar shelob9 avatar

Stargazers

 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

baldrickjs's Issues

back and forward in a browser does not work consistently

Follow a link that has a trigger which changes the pages content, then click back. If there is no longer a hash value in the address bar then the page will not go back to the state that the page was originally in before you clicked the link.

Move event system from plugin to core?

If we move the core emit() and on() functions from events plugin to Baldrickjs core we can use it to provide hooks into most parts of baldrick.

Should be able to move history, progress, clear, perhaps others to plugins.

Integration with Angular.js

hi,
this is so beautiful and well designed and documented Plugin, is there a way to integrate it with Angular.js

thanks in advanced.

Help need

Heyhey mr. cramer :) are there some instructions to use baldrick.js with a so called ajax load more?

History API for html5

The correct way to be doing history is not to have the hash.
in html5 you can use manipulate the history directly. This means you can change the whole URL without page reloads.
However this does mean your backend system needs to work with it.

example.
A trigger may request http://example.com/user/david
Using that URL directly should give you the exact same result as the end result.

So using this method, the server should be able to give ajax requests only the differences.

just a thought.

V2.4

Need ideas on making the next update.

Cannot read property 'ownerDocument' of null

Hi,

I'm using baldrick.js and getting the error Cannot read property 'ownerDocument' of null on the target function. It happens inside jQuery. It seems like the error is thrown because an ownerDocument property is missing. jQuery calls one of its functions and passes a.ownerDocument as an argument to it, and then inside the function it again checks for an ownerDocument property of that argument. But because it is null, essentially inside the function it tries to do null.ownerDocument, so it throws the error.

Do you have any idea why there is no ownerDocument property in the first place? Or what is causing this error?

Dynamic requests

We need a way to be able to create a new request programmatically.

data-target-placement

Need a setting to set the placement of the request response in the target.

  • data-target-placement="prepend"
  • data-target-placement="append
  • data-target-placement="replace" (default)

possible extras:

  • data-target-placement="before"
  • data-target-placement="after"

.genid can produce duplicates

If two triggers have the same settings they will share the same ID for the hash.
An example is a pagination index above and below page. each page link would be duplicated in both.

MutationObserver on target

I think it would be better to add a MutationObserver to the target element to watch for changes, and use DOMSubtreeModified event for older browsers.
It can then buildTriggers only within the change instead of reload the whole thing again.

Silent request: no target defined but still do request.

Been thinking of having silent requests. It would be very useful to have a request happen without needing to output a result.
I think setting data-target="+void" could do this. Using the + or something to prevent using an element that just happens to have an ID "void".

Thoughts?

data-event enhancments: keypress with key

It would be nice to have something like

<button ... data-event="keyup:13" >

This would indicate that if keyup is 13 (enter) then fire event. Separating them with commas would give other keys..

<button ... data-event="keyup:13,27" >

Indicating that do request on enter or escape key.

multi event binding

On with data-event, It would be nice to be able to specify multiple events to bind to a trigger.

<input type="text" ... data-event="keyup,blur" />

This would then bind both keyup and loosing focus away from the element.
Further to this, if we added multi request options in the same way like:

<input type="text" ... data-request="user/update,user/check" data-event="keyup,blur" />

Could indicate that the first event binds to the first request and the second event to the second request.

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.