Skip to content

Commit

Permalink
Renamed to angular-promise-react
Browse files Browse the repository at this point in the history
  • Loading branch information
erpheus committed Apr 15, 2015
1 parent 164faba commit 4c6d5ab
Show file tree
Hide file tree
Showing 24 changed files with 313 additions and 73 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var config = {
dist: 'dist',
demo: 'demo',
tmp: 'tmp',
prefix: 'promise-button'
prefix: 'promise-react'
}


Expand Down Expand Up @@ -96,7 +96,7 @@ module.exports = function (grunt) {
},
html2js: {
options: {
module: 'promise-button-templates',
module: 'promise-react-templates',
base: 'tmp'
},
tmp: {
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# angular-promise-button
# angular-promise-react

[![Build Status](https://travis-ci.org/erpheus/angular-promise-button.svg?branch=master)](https://travis-ci.org/erpheus/angular-promise-button)
[![Build Status](https://travis-ci.org/erpheus/angular-promise-react.svg?branch=master)](https://travis-ci.org/erpheus/angular-promise-react)

Angular directive for buttons or links that trigger a deferred call and display status and outcome in the button itself.

Expand All @@ -10,26 +10,26 @@ Angular directive for buttons or links that trigger a deferred call and display

Install it via bower:

$ bower install angular-promise-button --save
$ bower install angular-promise-react --save


or download the [minified source](https://github.com/erpheus/angular-promise-button/releases/latest) from github.
or download the [minified source](https://github.com/erpheus/angular-promise-react/releases/latest) from github.

Include angular-promise-button0s script tag after angularjs's one:
Include angular-promise-react0s script tag after angularjs's one:

```html
<script type="text/javascript" src="angular-promise-button/angular-promise-button.js"></script>
<script type="text/javascript" src="angular-promise-react/angular-promise-react.js"></script>
```

Inject `promise-button` directive into your angular module:
Inject `promise-react` directive into your angular module:

```javascript
angular.module('myApp', ['promise-button'])
angular.module('myApp', ['promise-react'])
```

### Basic usage

Full documentation and examples [in here](http://erpheus.github.io/angular-promise-button)
Full documentation and examples [in here](http://erpheus.github.io/angular-promise-react)

```html
<a promise-button="deferredAction()">
Expand Down Expand Up @@ -57,4 +57,4 @@ Full documentation and examples [in here](http://erpheus.github.io/angular-promi


## License
Licensed under the terms of the [Apache license 2.0](https://github.com/erpheus/angular-promise-button/blob/master/LICENSE)
Licensed under the terms of the [Apache license 2.0](https://github.com/erpheus/angular-promise-react/blob/master/LICENSE)
11 changes: 6 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "angular-promise-button",
"version": "0.7.0",
"homepage": "https://github.com/erpheus/angular-promise-button",
"name": "angular-promise-react",
"version": "0.8.0",
"homepage": "https://erpheus.github.io/angular-promise-react",
"authors": [
"Erpheus <[email protected]>"
],
"description": "Angular button directive for deferred actions.",
"main": "dist/angular-promise-button.min.js",
"description": "Angular directives for displaying status of deferred actions.",
"main": "dist/angular-promise-react.min.js",
"moduleType": [
"es6"
],
Expand All @@ -15,6 +15,7 @@
"button",
"deferred",
"promise",
"react",
"status"
],
"license": "Apache 2.0",
Expand Down
14 changes: 7 additions & 7 deletions demo/angular-promise-button/angular-promise-button.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function(){

var module = angular.module('promise-button',['promise-button-templates']);
var module = angular.module('promise-react',['promise-react-templates']);

module.constant('STATES', {
IDLE: 'idle',
Expand All @@ -13,7 +13,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

module.directive('promiseDefault', function(){
return {
Expand All @@ -28,7 +28,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

// thanks to Joscha and hilnius: http://stackoverflow.com/questions/20325480/angularjs-whats-the-best-practice-to-add-ngif-to-a-directive-programmatically
module.directive('whenProgress', ['ngIfDirective','STATES', function(ngIfDirective, STATES){
Expand Down Expand Up @@ -81,7 +81,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

// thanks to Joscha and hilnius: http://stackoverflow.com/questions/20325480/angularjs-whats-the-best-practice-to-add-ngif-to-a-directive-programmatically
module.directive('whenPromise', ['ngIfDirective','STATES', function(ngIfDirective, STATES){
Expand Down Expand Up @@ -134,7 +134,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

module.controller('PromiseButtonController', [
'$scope',
Expand Down Expand Up @@ -202,7 +202,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

module.directive('promiseButton', ['$parse', function($parse){
return {
Expand All @@ -220,7 +220,7 @@
}]);

})();
angular.module('promise-button-templates', ['directives/promise-default.tpl.html']);
angular.module('promise-react-templates', ['directives/promise-default.tpl.html']);

angular.module("directives/promise-default.tpl.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("directives/promise-default.tpl.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function(){

var module = angular.module('promise-button',['promise-button-templates']);
var module = angular.module('promise-react',['promise-react-templates']);

module.constant('STATES', {
IDLE: 'idle',
Expand All @@ -13,7 +13,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

module.directive('promiseDefault', function(){
return {
Expand All @@ -28,7 +28,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

// thanks to Joscha and hilnius: http://stackoverflow.com/questions/20325480/angularjs-whats-the-best-practice-to-add-ngif-to-a-directive-programmatically
module.directive('whenProgress', ['ngIfDirective','STATES', function(ngIfDirective, STATES){
Expand Down Expand Up @@ -81,7 +81,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

// thanks to Joscha and hilnius: http://stackoverflow.com/questions/20325480/angularjs-whats-the-best-practice-to-add-ngif-to-a-directive-programmatically
module.directive('whenPromise', ['ngIfDirective','STATES', function(ngIfDirective, STATES){
Expand Down Expand Up @@ -134,7 +134,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

module.controller('PromiseButtonController', [
'$scope',
Expand Down Expand Up @@ -202,7 +202,7 @@
})();
(function(){

var module = angular.module('promise-button');
var module = angular.module('promise-react');

module.directive('promiseButton', ['$parse', function($parse){
return {
Expand All @@ -220,7 +220,7 @@
}]);

})();
angular.module('promise-button-templates', ['directives/promise-default.tpl.html']);
angular.module('promise-react-templates', ['directives/promise-default.tpl.html']);

angular.module("directives/promise-default.tpl.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("directives/promise-default.tpl.html",
Expand Down
2 changes: 1 addition & 1 deletion demo/demo-controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function(){

var app = angular.module('demo',['promise-button','angular-example','ui.bootstrap']);
var app = angular.module('demo',['promise-react','angular-example','ui.bootstrap']);

app.controller('DemoController',[
'$scope',
Expand Down
37 changes: 22 additions & 15 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html ng-app="demo">
<head>
<title>Angular Promise Button Demo</title>
<title>Angular Promise React Demo</title>
<meta charset="utf-8"/>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="angular.js"></script>
<script type="text/javascript" src="angular-promise-button/angular-promise-button.js"></script>
<script type="text/javascript" src="angular-promise-react/angular-promise-react.js"></script>

<script type="text/javascript" src="https://angularjs.org/google-code-prettify/prettify.min.js">
</script>
Expand Down Expand Up @@ -69,17 +69,17 @@
<!-- Fork on github -->
<div class="github-fork-ribbon-wrapper right" >
<div class="github-fork-ribbon">
<a href="https://github.com/erpheus/angular-promise-button">Fork me on GitHub</a>
<a href="https://github.com/erpheus/angular-promise-react">Fork me on GitHub</a>
</div>
</div>

<!-- Title -->

<div class="header">
<div class="container">
<h1>Angular promise button</h1>
<h1>Angular promise react</h1>
<p>
An angular library for making buttons that show the state of their call live.
An angular library for making promise spinners and buttons that show the state of their call live.
</p>
<button promise-button="try_me()" class="btn btn-lg btn-danger">
<span when-promise="idle">try me!</span>
Expand All @@ -91,27 +91,34 @@ <h1>Angular promise button</h1>
</div>
</div>

<div class="container">
<div class="alert alert-warning" role="alert">
<strong>Warning!</strong>
This library is still in early development and has just changed its name to not interfere with existing libraries. Changes coming soon!!
</div>
</div>

<!-- Installation -->

<div class="container">
<h1>Installation</h1>
<p>angular-promise-button can be downloaded with bower:</p>
<p>angular-promise-react can be downloaded with bower:</p>
<div class="well">
<code>bower install angular-promise-button --save</code>
<code>bower install angular-promise-react --save</code>
</div>
<p>or you can download the latest version from github:</p>
<a href="https://github.com/erpheus/angular-promise-button/releases/latest" class="btn btn-success"><i class="fa fa-github"></i> Latest release</a>
<a href="https://github.com/erpheus/angular-promise-react/releases/latest" class="btn btn-success"><i class="fa fa-github"></i> Latest release</a>

<hr>

<p>Include angular-promise-button's script tag after angularjs' one</p>
<p>Include angular-promise-react's script tag after angularjs' one</p>
<div class="well">
<code>&lt;script type="text/javascript" src="angular-promise-button/angular-promise-button.js"&gt;&lt;/script&gt; </code>
<code>&lt;script type="text/javascript" src="path/to/promise/react/angular-promise-react.min.js"&gt;&lt;/script&gt; </code>
</div>

<p>Inject <code>promise-button</code> directive into your angular module:</p>
<p>Inject <code>promise-react</code> directive into your angular module:</p>
<div class="well">
<code>angular.module('myApp', ['promise-button'])</code>
<code>angular.module('myApp', ['promise-react'])</code>
</div>
</div>

Expand Down Expand Up @@ -229,7 +236,7 @@ <h2>Fully featured button</h2>
</div>
</script>
<script id="simple-real.js">
angular.module('simple',['promise-button'])
angular.module('simple',['promise-react'])
.controller('SimpleController',['$scope', '$timeout',
function($scope, $timeout){
$scope.wait_3_seconds = function(){
Expand Down Expand Up @@ -262,7 +269,7 @@ <h2>Fully featured button</h2>
</div>
</script>
<script id="simple-customized-real.js">
angular.module('simple-customized',['promise-button'])
angular.module('simple-customized',['promise-react'])
.controller('SimpleCustomController',['$scope', '$timeout',
function($scope, $timeout){
$scope.wait_3_seconds = function(){
Expand Down Expand Up @@ -317,7 +324,7 @@ <h2>Fully featured button</h2>
</div>
</script>
<script id="full-real.js">
angular.module('full',['promise-button'])
angular.module('full',['promise-react'])
.controller('FullController',['$scope', '$timeout','$q',
function($scope, $timeout, $q){
$scope.download = function(){
Expand Down
1 change: 0 additions & 1 deletion dist/angular-promise-button.min.js

This file was deleted.

Loading

0 comments on commit 4c6d5ab

Please sign in to comment.