Skip to content

Commit 764e735

Browse files
committed
project cleanup
1 parent 0d26fa9 commit 764e735

File tree

9 files changed

+109
-18
lines changed

9 files changed

+109
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ It's also possible to do the blocking manually. The blockUI module exposes a ser
5151
});
5252

5353
##### Non-angular events
54-
Note that whenever you're starting or stopping a block in an event outside of _AngularJS_ you'll need to wrap this inside a `$apply` call to [make _AngularJS_ aware of changes on the scope](jimhoskins.com/2012/12/17/angularjs-and-apply.html).
54+
Note that whenever you're starting or stopping a block in an event outside of _AngularJS_ you'll need to wrap this inside a `$apply` call to [make _AngularJS_ aware of changes on the scope](http://jimhoskins.com/2012/12/17/angularjs-and-apply.html).
5555

5656
```
5757
var button = document.getElementById('clickMe');

bower.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,20 @@
3232
"dist/angular-block-ui.css"
3333
],
3434
"dependencies": {
35-
"angular": "~1.2.21"
35+
"angular": "~1.2.26"
3636
},
3737
"devDependencies": {
38-
"angular-route": "~1.2.21",
38+
"angular-route": "~1.2.26",
39+
"angular-resource": "~1.2.26",
40+
"angular-mocks": "~1.2.26",
41+
"angular-animate": "~1.2.26",
42+
"angular-inform": "~0.0.8",
43+
"angular-response-lag": "~0.0.1",
3944
"bootstrap": "~3.2.0",
4045
"jquery": "1.*",
4146
"respond": "~1.4.2",
4247
"html5shiv": "~3.7.2",
43-
"angular-resource": "~1.2.22",
4448
"showdown": "~0.3.1",
45-
"angular-mocks": "~1.2.22",
46-
"angular-inform": "~0.0.8",
47-
"angular-animate": "~1.2.22",
4849
"animate.css": "~3.2.0"
4950
},
5051
"overrides": {

build-config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ var config = {
2424
name: 'angular-block-ui',
2525
alias: 'blockUI'
2626
},
27-
{
28-
name: 'angular-delay',
29-
alias: 'delay'
30-
},
27+
// {
28+
// name: 'angular-delay',
29+
// alias: 'delay'
30+
// },
3131
{
3232
name: 'angular-showdown',
3333
alias: 'showdown'

src/app/app.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ angular.module('myApp', [
44
'ngAnimate',
55
'blockUI',
66
'showdown',
7-
'delay',
7+
'responseLag',
88
'inform',
99
'inform-exception',
1010
'inform-http-exception'
@@ -32,7 +32,7 @@ angular.module('myApp', [
3232
redirectTo: '/'
3333
});
3434

35-
}).config(function (blockUIConfig, delayConfig, $locationProvider) {
35+
}).config(function (blockUIConfig, responseLagConfig, $locationProvider) {
3636

3737
// Enable hashbangs
3838

@@ -42,15 +42,15 @@ angular.module('myApp', [
4242
window.location.search.indexOf('_escaped_fragment_')!=-1 ||
4343
window.navigator.userAgent.indexOf('Prerender')!=-1) {
4444

45-
delayConfig.enabled = false;
45+
responseLagConfig.enabled = false;
4646
blockUIConfig.autoBlock = false;
4747
blockUIConfig.autoInjectBodyBlock = false;
4848

4949
} else {
50-
delayConfig.excludes.push(/.*\.md/i);
51-
delayConfig.enabled = true;
52-
delayConfig.timeout.min = 750;
53-
delayConfig.timeout.max = 1500;
50+
responseLagConfig.excludes.push(/.*\.md/i);
51+
responseLagConfig.enabled = true;
52+
responseLagConfig.timeout.min = 750;
53+
responseLagConfig.timeout.max = 1500;
5454

5555
// // Change the displayed message based on the http verbs being used.
5656
// blockUIConfig.requestFilter = function(config) {

src/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<script src="vendor/angular-animate/angular-animate.min.js"></script>
4343
<script src="vendor/angular-resource/angular-resource.min.js"></script>
4444
<script src="vendor/angular-inform/dist/angular-inform.min.js"></script>
45+
<script src="vendor/angular-response-lag/angular-response-lag.min.js"></script>
4546

4647
<% _.forEach(js, function(include) { %>
4748
<script src="<%-include%>"></script>

src/sandbox/autoblocking/index.html

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!DOCTYPE html>
2+
<html ng-app="myApp">
3+
4+
<head>
5+
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" data-semver="3.2.0" data-require="bootstrap-css@*" />
6+
<script data-require="angular.js@1.2.*" data-semver="1.2.25" src="https://code.angularjs.org/1.2.25/angular.js"></script>
7+
8+
<!--<link data-require="angular-block-ui@*" data-semver="0.1.1" rel="stylesheet" href="https://cdn.rawgit.com/McNull/angular-block-ui/v0.1.1/dist/angular-block-ui.min.css" />-->
9+
<!--<script data-require="angular-block-ui@*" data-semver="0.1.1" src="https://cdn.rawgit.com/McNull/angular-block-ui/v0.1.1/dist/angular-block-ui.min.js"></script>-->
10+
11+
<link rel="stylesheet" href="/angular-block-ui/angular-block-ui.min.css">
12+
<script src="/angular-block-ui/angular-block-ui.min.js"></script>
13+
<link rel="stylesheet" href="style.css" />
14+
<script src="script.js"></script>
15+
</head>
16+
17+
<body>
18+
<div class="container">
19+
<div class="jumbotron">
20+
<a target="_blank" href="https://github.com/McNull/angular-block-ui" class="pull-right">
21+
<span class="glyphicon glyphicon-new-window"></span>
22+
GitHub Project</a>
23+
<h1>angular-block-ui</h1>
24+
<p>Setting the <em>main</em> block-ui instance manually.</p>
25+
</div>
26+
</div>
27+
28+
<div ng-controller="MyController" class="container">
29+
30+
<div block-ui="main" class="block-ui-main">
31+
32+
<div class="panel panel-default">
33+
<div class="panel-heading">
34+
<h3 class="panel-title">I am the main block instance</h3>
35+
</div>
36+
<div class="panel-body">
37+
<p>
38+
By default the <em>block-ui</em> module marks the <em>body</em> element as the <em>main</em> block instance.
39+
But in some cases this behaviour is not desired. When for instance the <em>body</em> element is not accessible or your <em>ng-app</em> directive is
40+
a child element of the <em>body</em> element.
41+
</p>
42+
<p>It is however quite simple to relocate the <em>main</em> block-ui instance by simply marking a different element as the main instance.</p>
43+
44+
<pre><code>&lt;!-- Mark the desired containing element as the main block instance --&gt;
45+
&lt;div block-ui=&quot;main&quot; class=&quot;block-ui-main&quot;&gt;
46+
&lt;p&gt;Lorem ipsum ... &lt;/p&gt;
47+
&lt;/div&gt;</code></pre>
48+
49+
<pre><code>angular.module('myApp').config(function(blockUIConfig) {
50+
// Tell blockUI not to mark the body element as the main block scope.
51+
blockUIConfig.autoInjectBodyBlock = false;
52+
});</code></pre>
53+
54+
<div class="text-center">
55+
<button class="btn btn-primary" ng-click="startBlock()">Start demo block</button>
56+
</div>
57+
58+
</div>
59+
</div>
60+
61+
</div>
62+
63+
64+
65+
</div>
66+
</body>
67+
68+
</html>

src/sandbox/autoblocking/script.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
var myApp = angular.module('myApp', ['blockUI']);
3+
4+
myApp.config(function(blockUIConfig) {
5+
// Tell blockUI not to mark the body element as the main block scope.
6+
blockUIConfig.autoInjectBodyBlock = false;
7+
});
8+
9+
myApp.controller('MyController', function($scope, blockUI, $timeout) {
10+
11+
$scope.startBlock = function() {
12+
13+
blockUI.start();
14+
15+
$timeout(function() {
16+
blockUI.stop();
17+
}, 2000);
18+
};
19+
20+
});

src/sandbox/autoblocking/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Styles go here */

src/sandbox/manual-main/README.md

Whitespace-only changes.

0 commit comments

Comments
 (0)