Giter VIP home page Giter VIP logo

emberjs-async-button's Introduction

Emberjs-async-button

With this component you'll be able to avoid multiple clicks in one button or link, until the action is finished or timeout is triggered

Live Demo

Sample Code

{{#async-button action="action1" timeout=5000 class="btn-default" param1="PARAM1" param2=parambound}}Call action1{{/async-button}}

This code will call an action in the controller called action1 with the next signature:

action1: function(param1, param2, resolve) where:

  • param1 value will be "PARAM1"
  • param2 value will be the bound value in the controller property parambound
  • resolve is a callback function to indicate the action is finished. It is useful when you are doing async function such as store.save or similiar.

60 seconds is the default timeout but you can overrite with timeout property, and you can set an action for timeout with the property timeoutAction

Currently I'm using bootstrap to styles, but is not need it if you want, you can apply the style you want

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone <repository-url> this repository
  • change into the new directory
  • npm install
  • bower install

Running / Development

emberjs-async-button's People

Contributors

sergiferran avatar

Stargazers

CHEWTOYS avatar

Watchers

 avatar

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.