You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-7Lines changed: 33 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,22 @@ A simple AngularJS module that allows you to block user interaction on AJAX requ
5
5
#### Dependencies
6
6
Besides AngularJS (~1.2.4), none.
7
7
8
+
#### Installation
9
+
Either copy the contents of the `package` directory of the [Github](https://github.com/McNull/angular-block-ui) project or install with _bower_ from the command line (**recommended**):
Create a dependency on `blockUI` in your main Angular module:
19
+
20
+
angular.module('myApp', ['blockUI'])
21
+
8
22
#### Usage
9
-
By default the module will block the user interface on each pending request made from the browser. This behavior can be modified in the configuration.
23
+
By default the module will block the user interface on each pending request made from the browser. This behaviour can be modified in the configuration.
10
24
11
25
It's also possible to do the blocking manually. The blockUI module exposes a service by the same name. Access to the service is gained by injecting it into your controller or directive:
12
26
@@ -31,9 +45,9 @@ BlockUI service methods
31
45
=======================
32
46
33
47
#### start
34
-
The start method will start the user interface block. Because multiple user interface elements can request a user interface block at the same time, the service keeps track of the number of start calls. Each call to start() will increase the count and every call to stop() will decrease the value. Whenever the count reaches 0 the block will end.
48
+
The start method will start the user interface block. Because multiple user interface elements can request a user interface block at the same time, the service keeps track of the number of start calls. Each call to `start()` will increase the count and every call to `stop()` will decrease the value. Whenever the count reaches 0 the block will end.
35
49
36
-
*Note: By default the block is immediately active after calling this method, but to prevent trashing the user interface everytime a button is pressed, the block is visible after a short delay. This behaviour can be modified in the configuration.*
50
+
*Note: By default the block is immediately active after calling this method, but to prevent trashing the user interface each time a button is pressed, the block is visible after a short delay. This behaviour can be modified in the configuration.*
37
51
38
52
**Arguments:**
39
53
@@ -60,7 +74,7 @@ The callback function to queue.
60
74
BlockUI overlay template
61
75
========================
62
76
63
-
The html and styling of the builtin template is kept barebone. It consist of two divs (overlay and message):
77
+
The html and styling of the builtin template is kept bare bone. It consist of two divs (overlay and message):
@@ -118,7 +132,19 @@ By default the BlockUI module will start a block whenever the Angular *$http* se
118
132
blockUIConfigProvider.autoBlock(false);
119
133
120
134
#### resetOnException
121
-
By default the BlockUI module will reset the block count and hide the overlay whenever an exception has occured. You can set this value to *false* if you don't want this behaviour.
135
+
By default the BlockUI module will reset the block count and hide the overlay whenever an exception has occurred. You can set this value to *false* if you don't want this behaviour.
136
+
137
+
// Disable clearing block whenever an exception has occurred
138
+
blockUIConfigProvider.resetOnException(false);
139
+
140
+
#### requestFilter
141
+
Allows you to specify a filter function to exclude certain ajax requests from blocking the user interface. The function is passed the [Angular request config object](http://docs.angularjs.org/api/ng/service/$http). The blockUI service will ignore requests when the function returns `false`.
122
142
123
-
// Disable clearing block whenever an exception has occured
124
-
blockUIConfigProvider.resetOnException(false);
143
+
// Tell the blockUI service to ignore certain requests
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "angular-block-ui",
3
-
"version": "0.0.3",
3
+
"version": "0.0.4",
4
4
"description": "A simple AngularJS module that allows you to block user interaction on AJAX requests. Blocking is done automatically for each http request and/or manually via an injectable service.",
Copy file name to clipboardExpand all lines: package/angular-block-ui/README.md
+34-7Lines changed: 34 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,23 @@ A simple AngularJS module that allows you to block user interaction on AJAX requ
5
5
#### Dependencies
6
6
Besides AngularJS (~1.2.4), none.
7
7
8
+
#### Installation
9
+
Either copy the contents of the `package` directory of the [Github](https://github.com/McNull/angular-block-ui) project or install with _bower_ from the command line (**recommended**):
Create a dependency on `blockUI` in your main Angular module:
20
+
21
+
angular.module('myApp', ['blockUI'])
22
+
8
23
#### Usage
9
-
By default the module will block the user interface on each pending request made from the browser. This behavior can be modified in the configuration.
24
+
By default the module will block the user interface on each pending request made from the browser. This behaviour can be modified in the configuration.
10
25
11
26
It's also possible to do the blocking manually. The blockUI module exposes a service by the same name. Access to the service is gained by injecting it into your controller or directive:
12
27
@@ -31,9 +46,9 @@ BlockUI service methods
31
46
=======================
32
47
33
48
#### start
34
-
The start method will start the user interface block. Because multiple user interface elements can request a user interface block at the same time, the service keeps track of the number of start calls. Each call to start() will increase the count and every call to stop() will decrease the value. Whenever the count reaches 0 the block will end.
49
+
The start method will start the user interface block. Because multiple user interface elements can request a user interface block at the same time, the service keeps track of the number of start calls. Each call to `start()` will increase the count and every call to `stop()` will decrease the value. Whenever the count reaches 0 the block will end.
35
50
36
-
*Note: By default the block is immediately active after calling this method, but to prevent trashing the user interface everytime a button is pressed, the block is visible after a short delay. This behaviour can be modified in the configuration.*
51
+
*Note: By default the block is immediately active after calling this method, but to prevent trashing the user interface each time a button is pressed, the block is visible after a short delay. This behaviour can be modified in the configuration.*
37
52
38
53
**Arguments:**
39
54
@@ -60,7 +75,7 @@ The callback function to queue.
60
75
BlockUI overlay template
61
76
========================
62
77
63
-
The html and styling of the builtin template is kept barebone. It consist of two divs (overlay and message):
78
+
The html and styling of the builtin template is kept bare bone. It consist of two divs (overlay and message):
@@ -118,7 +133,19 @@ By default the BlockUI module will start a block whenever the Angular *$http* se
118
133
blockUIConfigProvider.autoBlock(false);
119
134
120
135
#### resetOnException
121
-
By default the BlockUI module will reset the block count and hide the overlay whenever an exception has occured. You can set this value to *false* if you don't want this behaviour.
136
+
By default the BlockUI module will reset the block count and hide the overlay whenever an exception has occurred. You can set this value to *false* if you don't want this behaviour.
137
+
138
+
// Disable clearing block whenever an exception has occurred
139
+
blockUIConfigProvider.resetOnException(false);
140
+
141
+
#### requestFilter
142
+
Allows you to specify a filter function to exclude certain ajax requests from blocking the user interface. The function is passed the [Angular request config object](http://docs.angularjs.org/api/ng/service/$http). The blockUI service will ignore requests when the function returns `false`.
122
143
123
-
// Disable clearing block whenever an exception has occured
124
-
blockUIConfigProvider.resetOnException(false);
144
+
// Tell the blockUI service to ignore certain requests
0 commit comments