Skip to content

Commit cf80656

Browse files
author
Null McNull
committed
dist build
1 parent e583713 commit cf80656

File tree

8 files changed

+34
-101
lines changed

8 files changed

+34
-101
lines changed

dist/README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Besides AngularJS (~1.2.4), none.
99
Live demos can be found on [Plunker](http://plnkr.co/edit/XWRfHX?p=preview) or by executing the website included in the [GitHub project](https://github.com/McNull/angular-block-ui) .
1010

1111
#### Installation
12-
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**):
12+
Either copy the contents of the `dist` directory of the [Github](https://github.com/McNull/angular-block-ui) project or install with _bower_ from the command line (**recommended**):
1313

1414
bower install angular-block-ui
1515

@@ -114,70 +114,69 @@ Automatic blocking elements can be done by providing the `block-ui` directive a
114114
BlockUI module configuration
115115
============================
116116

117-
The configuration of the BlockUI module can be modified via the **blockUIConfigProvider** during the config phase of your Angular application:
117+
The configuration of the BlockUI module can be modified via the `blockUIConfig` during the config phase of your Angular application:
118118

119-
angular.module('myApp').config(function(blockUIConfigProvider) {
119+
angular.module('myApp').config(function(blockUIConfig) {
120120
121121
// Change the default overlay message
122-
blockUIConfigProvider.message('Please stop clicking!');
122+
blockUIConfig.message = 'Please stop clicking!';
123123
124124
// Change the default delay to 100ms before the blocking is visible
125-
blockUIConfigProvider.delay(100);
125+
blockUIConfig.delay = 100;
126126
127127
});
128128

129-
### Methods
129+
### Properties
130130

131131
#### message
132132
Changes the default message to be used when no message has been provided to the *start* method of the service. Default value is *'Loading ...'*.
133133

134134
// Change the default overlay message
135-
blockUIConfigProvider.message('Please wait');
135+
blockUIConfig.message = 'Please wait';
136136

137137
#### delay
138138
Specifies the amount in milliseconds before the block is visible to the user. By delaying a visible block your application will appear more responsive. The default value is *250*.
139139

140140
// Change the default delay to 100ms before the blocking is visible ...
141-
blockUIConfigProvider.delay(100);
141+
blockUIConfig.delay = 100;
142142

143143
// ... or completely remove the delay
144-
blockUIConfigProvider.delay(1);
144+
blockUIConfig.delay = 0;
145145

146146
#### template
147147
Specifies a custom template to use as the overlay.
148148

149149
// Provide a custom template to use
150-
blockUIConfigProvider.template('<pre><code>{{ state | json }}</code></pre>');
150+
blockUIConfig.template = '<pre><code>{{ state | json }}</code></pre>';
151151

152152
#### templateUrl
153153
Specifies a url to retrieve the template from. *The current release only works with pre-cached templates, which means that this url should be known in the $templateCache service of Angular. If you're using the grunt with html2js or angular-templates, which I highly recommend, you're already set.*
154154

155155
// Provide the custom template via a url
156-
blockUIConfigProvider.templateUrl('my-templates/block-ui-overlay.html');
156+
blockUIConfig.templateUrl = 'my-templates/block-ui-overlay.html';
157157

158158
#### autoBlock
159159
By default the BlockUI module will start a block whenever the Angular *$http* service has an pending request. If you don't want this behaviour and want to do all the blocking manually you can change this value to *false*.
160160

161161
// Disable automatically blocking of the user interface
162-
blockUIConfigProvider.autoBlock(false);
162+
blockUIConfig.autoBlock = false;
163163

164164
#### resetOnException
165165
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.
166166

167167
// Disable clearing block whenever an exception has occurred
168-
blockUIConfigProvider.resetOnException(false);
168+
blockUIConfig.resetOnException = false;
169169

170170
#### requestFilter
171171
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`.
172172

173173
// Tell the blockUI service to ignore certain requests
174-
blockUIConfigProvider.requestFilter(function(config) {
175-
176-
// If the request starts with '/api/quote' ...
174+
blockUIConfig.requestFilter = function(config) {
175+
// If the request starts with '/api/quote' ...
177176
if(config.url.match(/^\/api\/quote($|\/).*/)) {
178177
return false; // ... don't block it.
179178
}
180-
});
179+
};
181180

182181
#### autoInjectBodyBlock
183182
When the module is started it will inject the _main block element_ by adding the `block-ui` directive to the `body` element.
@@ -187,6 +186,11 @@ When the module is started it will inject the _main block element_ by adding the
187186

188187
This behaviour can be disabled if there no need for any _fullscreen_ blocking or if there's more control required.
189188

190-
blockUIConfigProvider.autoInjectBodyBlock(false); // Disable auto body block
189+
blockUIConfig.autoInjectBodyBlock = false; // Disable auto body block
191190

191+
#### cssClass
192+
A string containing the default css classes, separated by spaces, that should be applied to each block-ui element. The default value is `'block-ui block-ui-anim-fade'`.
193+
194+
If this needs to be overridden for a certain element; set the desired classes on the element including the `block-ui` class. This way the directive will not apply the configured classes to the element.
192195

196+
blockUIConfig.cssClass = 'block-ui my-custom-class'; // Apply these classes to al block-ui elements

dist/angular-block-ui.css

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-block-ui.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-block-ui.js

Lines changed: 1 addition & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-block-ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-block-ui.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-block-ui.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)