Skip to content

Commit 4c6d5ab

Browse files
committed
Renamed to angular-promise-react
1 parent 164faba commit 4c6d5ab

24 files changed

+313
-73
lines changed

Gruntfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var config = {
66
dist: 'dist',
77
demo: 'demo',
88
tmp: 'tmp',
9-
prefix: 'promise-button'
9+
prefix: 'promise-react'
1010
}
1111

1212

@@ -96,7 +96,7 @@ module.exports = function (grunt) {
9696
},
9797
html2js: {
9898
options: {
99-
module: 'promise-button-templates',
99+
module: 'promise-react-templates',
100100
base: 'tmp'
101101
},
102102
tmp: {

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# angular-promise-button
1+
# angular-promise-react
22

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

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

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

1111
Install it via bower:
1212

13-
$ bower install angular-promise-button --save
13+
$ bower install angular-promise-react --save
1414

1515

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

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

2020
```html
21-
<script type="text/javascript" src="angular-promise-button/angular-promise-button.js"></script>
21+
<script type="text/javascript" src="angular-promise-react/angular-promise-react.js"></script>
2222
```
2323

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

2626
```javascript
27-
angular.module('myApp', ['promise-button'])
27+
angular.module('myApp', ['promise-react'])
2828
```
2929

3030
### Basic usage
3131

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

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

5858

5959
## License
60-
Licensed under the terms of the [Apache license 2.0](https://github.com/erpheus/angular-promise-button/blob/master/LICENSE)
60+
Licensed under the terms of the [Apache license 2.0](https://github.com/erpheus/angular-promise-react/blob/master/LICENSE)

bower.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "angular-promise-button",
3-
"version": "0.7.0",
4-
"homepage": "https://github.com/erpheus/angular-promise-button",
2+
"name": "angular-promise-react",
3+
"version": "0.8.0",
4+
"homepage": "https://erpheus.github.io/angular-promise-react",
55
"authors": [
66
"Erpheus <[email protected]>"
77
],
8-
"description": "Angular button directive for deferred actions.",
9-
"main": "dist/angular-promise-button.min.js",
8+
"description": "Angular directives for displaying status of deferred actions.",
9+
"main": "dist/angular-promise-react.min.js",
1010
"moduleType": [
1111
"es6"
1212
],
@@ -15,6 +15,7 @@
1515
"button",
1616
"deferred",
1717
"promise",
18+
"react",
1819
"status"
1920
],
2021
"license": "Apache 2.0",

demo/angular-promise-button/angular-promise-button.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function(){
22

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

55
module.constant('STATES', {
66
IDLE: 'idle',
@@ -13,7 +13,7 @@
1313
})();
1414
(function(){
1515

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

1818
module.directive('promiseDefault', function(){
1919
return {
@@ -28,7 +28,7 @@
2828
})();
2929
(function(){
3030

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

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

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

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

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

139139
module.controller('PromiseButtonController', [
140140
'$scope',
@@ -202,7 +202,7 @@
202202
})();
203203
(function(){
204204

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

207207
module.directive('promiseButton', ['$parse', function($parse){
208208
return {
@@ -220,7 +220,7 @@
220220
}]);
221221

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

225225
angular.module("directives/promise-default.tpl.html", []).run(["$templateCache", function($templateCache) {
226226
$templateCache.put("directives/promise-default.tpl.html",

dist/angular-promise-button.js demo/angular-promise-react/angular-promise-react.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function(){
22

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

55
module.constant('STATES', {
66
IDLE: 'idle',
@@ -13,7 +13,7 @@
1313
})();
1414
(function(){
1515

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

1818
module.directive('promiseDefault', function(){
1919
return {
@@ -28,7 +28,7 @@
2828
})();
2929
(function(){
3030

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

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

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

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

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

139139
module.controller('PromiseButtonController', [
140140
'$scope',
@@ -202,7 +202,7 @@
202202
})();
203203
(function(){
204204

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

207207
module.directive('promiseButton', ['$parse', function($parse){
208208
return {
@@ -220,7 +220,7 @@
220220
}]);
221221

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

225225
angular.module("directives/promise-default.tpl.html", []).run(["$templateCache", function($templateCache) {
226226
$templateCache.put("directives/promise-default.tpl.html",

demo/demo-controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function(){
22

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

55
app.controller('DemoController',[
66
'$scope',

demo/index.html

+22-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE html>
22
<html ng-app="demo">
33
<head>
4-
<title>Angular Promise Button Demo</title>
4+
<title>Angular Promise React Demo</title>
55
<meta charset="utf-8"/>
66

77

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

1212
<script type="text/javascript" src="https://angularjs.org/google-code-prettify/prettify.min.js">
1313
</script>
@@ -69,17 +69,17 @@
6969
<!-- Fork on github -->
7070
<div class="github-fork-ribbon-wrapper right" >
7171
<div class="github-fork-ribbon">
72-
<a href="https://github.com/erpheus/angular-promise-button">Fork me on GitHub</a>
72+
<a href="https://github.com/erpheus/angular-promise-react">Fork me on GitHub</a>
7373
</div>
7474
</div>
7575

7676
<!-- Title -->
7777

7878
<div class="header">
7979
<div class="container">
80-
<h1>Angular promise button</h1>
80+
<h1>Angular promise react</h1>
8181
<p>
82-
An angular library for making buttons that show the state of their call live.
82+
An angular library for making promise spinners and buttons that show the state of their call live.
8383
</p>
8484
<button promise-button="try_me()" class="btn btn-lg btn-danger">
8585
<span when-promise="idle">try me!</span>
@@ -91,27 +91,34 @@ <h1>Angular promise button</h1>
9191
</div>
9292
</div>
9393

94+
<div class="container">
95+
<div class="alert alert-warning" role="alert">
96+
<strong>Warning!</strong>
97+
This library is still in early development and has just changed its name to not interfere with existing libraries. Changes coming soon!!
98+
</div>
99+
</div>
100+
94101
<!-- Installation -->
95102

96103
<div class="container">
97104
<h1>Installation</h1>
98-
<p>angular-promise-button can be downloaded with bower:</p>
105+
<p>angular-promise-react can be downloaded with bower:</p>
99106
<div class="well">
100-
<code>bower install angular-promise-button --save</code>
107+
<code>bower install angular-promise-react --save</code>
101108
</div>
102109
<p>or you can download the latest version from github:</p>
103-
<a href="https://github.com/erpheus/angular-promise-button/releases/latest" class="btn btn-success"><i class="fa fa-github"></i> Latest release</a>
110+
<a href="https://github.com/erpheus/angular-promise-react/releases/latest" class="btn btn-success"><i class="fa fa-github"></i> Latest release</a>
104111

105112
<hr>
106113

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

112-
<p>Inject <code>promise-button</code> directive into your angular module:</p>
119+
<p>Inject <code>promise-react</code> directive into your angular module:</p>
113120
<div class="well">
114-
<code>angular.module('myApp', ['promise-button'])</code>
121+
<code>angular.module('myApp', ['promise-react'])</code>
115122
</div>
116123
</div>
117124

@@ -229,7 +236,7 @@ <h2>Fully featured button</h2>
229236
</div>
230237
</script>
231238
<script id="simple-real.js">
232-
angular.module('simple',['promise-button'])
239+
angular.module('simple',['promise-react'])
233240
.controller('SimpleController',['$scope', '$timeout',
234241
function($scope, $timeout){
235242
$scope.wait_3_seconds = function(){
@@ -262,7 +269,7 @@ <h2>Fully featured button</h2>
262269
</div>
263270
</script>
264271
<script id="simple-customized-real.js">
265-
angular.module('simple-customized',['promise-button'])
272+
angular.module('simple-customized',['promise-react'])
266273
.controller('SimpleCustomController',['$scope', '$timeout',
267274
function($scope, $timeout){
268275
$scope.wait_3_seconds = function(){
@@ -317,7 +324,7 @@ <h2>Fully featured button</h2>
317324
</div>
318325
</script>
319326
<script id="full-real.js">
320-
angular.module('full',['promise-button'])
327+
angular.module('full',['promise-react'])
321328
.controller('FullController',['$scope', '$timeout','$q',
322329
function($scope, $timeout, $q){
323330
$scope.download = function(){

dist/angular-promise-button.min.js

-1
This file was deleted.

0 commit comments

Comments
 (0)