Skip to content

Commit e8b2ca5

Browse files
Merge branch 'master-local' into master-dist
2 parents dcc4eb3 + 290a4a4 commit e8b2ca5

File tree

278 files changed

+86009
-41438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+86009
-41438
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ before_install:
1717
install: true
1818

1919
script:
20-
- ./node_modules/patternfly-eng-release/scripts/_build.sh -a
20+
- sh -x ./node_modules/patternfly-eng-release/scripts/_build.sh -a
2121

2222
after_success:
2323
- ./scripts/publish-ghpages.sh -t docs

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## 4.0.0 (YYYY-MM-DD) *not released yet*
2+
3+
Enhancements
4+
- Updated lodash dependency to 4.x
5+
- Updated angular-bootstrap dependency to 2.3.x
6+
- Dropped 1.3.x support for dependencies: angular, angular-animate, angular-sanitize, and angular-mocks
7+
- Removed jQuery dependency
8+
- Switched to using "lib/patternfly/dist/js/patternfly-settings.js"
9+
- Removed directives: pfSelect, pfDatepicker, pfDateTimepicker
10+
11+
Bug Fixes
12+
- Update layout for sort, filter, and toolbar to match patternfly markup
13+
14+
15+
Breaking Changes
16+
- pfInlineNotification - pfNotificationRemove function added which ties the click event of the close button to a user specified function. Previously, this used to be hardcoded to use the Notifications service, this is now optional.
17+
- pfListView - If defined, actionButton class will replace 'btn-default'. Previously it was appended. (Issue #434)

Gruntfile.js

Lines changed: 70 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,20 @@ module.exports = function (grunt) {
5454
},
5555
copy: {
5656
docdata: {
57-
cwd: 'lib/patternfly/dist',
57+
cwd: 'node_modules/patternfly/dist',
5858
src: ['fonts/*', 'img/*'],
5959
dest: 'docs',
6060
expand: true
6161
},
6262
fa: {
63-
cwd: 'lib/patternfly/',
63+
cwd: 'node_modules/patternfly/',
6464
src: ['components/font-awesome/**'],
6565
dest: 'docs',
6666
expand: true
6767
},
68-
styles: {
69-
cwd: 'styles/',
70-
src: ['*.css', '!*.min.css'],
71-
dest: 'dist/styles',
72-
expand: true
73-
},
7468
img: {
7569
cwd: 'misc/',
76-
src: 'patternfly-orb.svg',
70+
src: ['patternfly-orb.svg', '*.png'],
7771
dest: 'docs/img',
7872
expand: true
7973
},
@@ -82,13 +76,30 @@ module.exports = function (grunt) {
8276
src: ['**'],
8377
dest: 'dist/docs',
8478
expand: true
79+
},
80+
distimg: {
81+
cwd: 'misc',
82+
src: ['canvas-dot-grid.png'],
83+
dest: 'dist/imgs',
84+
expand: true
85+
}
86+
},
87+
less: {
88+
patternfly: {
89+
files: {
90+
'dist/styles/angular-patternfly.css': 'styles/angular-patternfly.less'
91+
},
92+
options: {
93+
paths: ['src/less/'],
94+
strictMath: true
95+
}
8596
}
8697
},
8798
cssmin: {
8899
target: {
89100
files: [{
90101
expand: true,
91-
cwd: 'styles',
102+
cwd: 'dist/styles',
92103
src: ['*.css', '!*.min.css'],
93104
dest: 'dist/styles',
94105
ext: '.min.css'
@@ -124,30 +135,37 @@ module.exports = function (grunt) {
124135
title: 'Angular Patternfly Documentation',
125136
dest: 'docs',
126137
image: 'misc/logo-alt.svg',
127-
scripts: ['lib/jquery/dist/jquery.js',
128-
'lib/bootstrap/dist/js/bootstrap.js',
129-
'lib/patternfly-bootstrap-combobox/js/bootstrap-combobox.js',
130-
'lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
131-
'lib/moment/moment.js',
132-
'lib/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js',
133-
'lib/bootstrap-select/js/bootstrap-select.js',
134-
'lib/patternfly-bootstrap-treeview/src/js/bootstrap-treeview.js',
135-
'lib/c3/c3.js',
136-
'lib/d3/d3.js',
137-
'lib/patternfly/dist/js/patternfly.js',
138-
'lib/angular/angular.js',
139-
'lib/angular-sanitize/angular-sanitize.js',
140-
'lib/angular-animate/angular-animate.js',
141-
'lib/angular-bootstrap/ui-bootstrap-tpls.js',
138+
scripts: [
139+
'node_modules/jquery/dist/jquery.js',
140+
'node_modules/components-jqueryui/jquery-ui.min.js',
141+
'node_modules/datatables.net/js/jquery.dataTables.js',
142+
'node_modules/datatables.net-select/js/dataTables.select.js',
143+
'node_modules/moment/moment.js',
144+
'node_modules/c3/c3.js',
145+
'node_modules/d3/d3.js',
146+
'node_modules/patternfly/dist/js/patternfly-settings.js',
147+
'node_modules/patternfly/dist/js/patternfly-settings-colors.js',
148+
'node_modules/patternfly/dist/js/patternfly-settings-charts.js',
149+
'node_modules/angular/angular.js',
150+
'node_modules/angular-dragdrop/src/angular-dragdrop.js',
151+
'node_modules/angular-datatables/dist/angular-datatables.min.js',
152+
'node_modules/angular-datatables/dist/plugins/select/angular-datatables.select.min.js',
153+
'node_modules/angular-sanitize/angular-sanitize.js',
154+
'node_modules/angular-animate/angular-animate.js',
155+
'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
142156
'misc/angular-bootstrap-prettify.js',
143-
'lib/lodash/lodash.min.js',
157+
'node_modules/lodash/lodash.min.js',
144158
'dist/angular-patternfly.js',
145-
'lib/angular-ui-router/release/angular-ui-router.min.js',
159+
'node_modules/angular-ui-router/release/angular-ui-router.min.js',
146160
'node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js'],
147161
html5Mode: false,
148162
template: 'grunt-ngdocs-index.tmpl',
149-
styles: ['node_modules/patternfly/dist/css/patternfly.css', 'node_modules/patternfly/dist/css/patternfly-additions.css',
150-
'dist/styles/angular-patternfly.css', 'misc/ng-docs.css', 'misc/examples.css']
163+
styles: ['node_modules/datatables.net-dt/css/jquery.dataTables.css',
164+
'node_modules/patternfly/dist/css/patternfly.css',
165+
'node_modules/patternfly/dist/css/patternfly-additions.css',
166+
'dist/styles/angular-patternfly.css',
167+
'misc/ng-docs.css',
168+
'misc/examples.css']
151169
},
152170

153171
all: ['src/**/*.js']
@@ -200,11 +218,21 @@ module.exports = function (grunt) {
200218
src: ['modals/**/*.html'],
201219
dest: 'templates/modals.js'
202220
},
221+
'patternfly.select': {
222+
cwd: 'src/',
223+
src: ['select/**/*.html'],
224+
dest: 'templates/select.js'
225+
},
203226
'patternfly.sort': {
204227
cwd: 'src/',
205228
src: ['sort/**/*.html'],
206229
dest: 'templates/sort.js'
207230
},
231+
'patternfly.table': {
232+
cwd: 'src/',
233+
src: ['table/**/*.html'],
234+
dest: 'templates/table.js'
235+
},
208236
'patternfly.toolbars': {
209237
cwd: 'src/',
210238
src: ['toolbars/**/*.html'],
@@ -219,6 +247,11 @@ module.exports = function (grunt) {
219247
cwd: 'src/',
220248
src: ['wizard/**/*.html'],
221249
dest: 'templates/wizard.js'
250+
},
251+
'patternfly.canvas': {
252+
cwd: 'src/',
253+
src: ['canvas-view/**/*.html'],
254+
dest: 'templates/canvas.js'
222255
}
223256
},
224257
// ng-annotate tries to make the code safe for minification automatically
@@ -251,8 +284,12 @@ module.exports = function (grunt) {
251284
files: ['Gruntfile.js'],
252285
tasks: ['eslint']
253286
},
287+
test: {
288+
files: ['test/**/*.js'],
289+
tasks: ['test']
290+
},
254291
all: {
255-
files: ['Gruntfile.js', 'src/**/*.js', 'src/**/*.html', 'styles/**/*.css'],
292+
files: ['Gruntfile.js', 'src/**/*.js', 'src/**/*.html', 'styles/**/*.css', '**/*.less'],
256293
tasks: ['build'],
257294
options: {
258295
livereload: 35722
@@ -261,7 +298,7 @@ module.exports = function (grunt) {
261298
}
262299
});
263300

264-
grunt.registerTask('copymain', ['copy:docdata', 'copy:fa', 'copy:styles', 'copy:img']);
301+
grunt.registerTask('copymain', ['copy:docdata', 'copy:fa', 'copy:img', 'copy:distimg']);
265302

266303
// You can specify which modules to build as arguments of the build task.
267304
grunt.registerTask('build', 'Create bootstrap build files', function () {
@@ -281,13 +318,13 @@ module.exports = function (grunt) {
281318
concatSrc = 'src/**/*.js';
282319
}
283320

284-
grunt.task.run(['clean', 'lint', 'test', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'cssmin', 'copymain', 'ngdocs', 'clean:templates']);
321+
grunt.task.run(['clean', 'lint', 'test', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'ngdocs', 'clean:templates']);
285322
});
286323

287324
// Runs all the tasks of build with the exception of tests
288325
grunt.registerTask('deploy', 'Prepares the project for deployment. Does not run unit tests', function () {
289326
var concatSrc = 'src/**/*.js';
290-
grunt.task.run(['clean', 'lint', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'cssmin', 'copymain', 'ngdocs', 'clean:templates']);
327+
grunt.task.run(['clean', 'lint', 'ngtemplates', 'concat', 'ngAnnotate', 'uglify:build', 'less', 'cssmin', 'copymain', 'ngdocs', 'clean:templates']);
291328
});
292329

293330
grunt.registerTask('default', ['build']);

README.md

Lines changed: 68 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,14 @@ You have to install required software before you're able to use grunt:
2121
Angular Patternfly stays up to date with the Node LTS [Release Schedule](https://github.com/nodejs/LTS#lts_schedule). If you're using Angular Patternfly downstream, we suggest the use of an actively supported version of Node/NPM, although prior versions of Node may work.
2222

2323
* Install npm - If npm is not already installed with Node.js, you have to install it manually. Find more information on [NPM](https://www.npmjs.org/)
24-
* Install Bower globally - Find more information on [Bower](http://bower.io/)
2524

26-
npm install -g bower
2725
* Install Grunt globally - Find more information on [Grunt](http://gruntjs.com/)
2826

2927
npm install -g grunt-cli
28+
3029
* Install npm dependencies with:
3130

3231
npm install
33-
* Install bower dependencies with:
34-
35-
bower install
3632

3733
You should have your environment ready now.
3834

@@ -52,8 +48,8 @@ Note:
5248

5349
1. Add Angular and Angular-PatternFly as dependencies for your project and you'll receive all the libraries you'll need:
5450

55-
$ bower install angular --save
56-
$ bower install angular-patternfly --save
51+
$ npm install angular --save
52+
$ npm install angular-patternfly --save
5753

5854
2. Add the core Patternfly CSS and script includes to your HTML file(s):
5955

@@ -62,29 +58,29 @@ Note:
6258
3. Add the following CSS include to your HTML file(s):
6359

6460
<!-- Angular-PatternFly Styles -->
65-
<link rel="stylesheet" href="bower_components/angular-patternfly/dist/styles/angular-patternfly.min.css" />
61+
<link rel="stylesheet" href="node_modules/angular-patternfly/dist/styles/angular-patternfly.min.css" />
6662

6763
4. Add the following script includes to your HTML file(s), adjusting where necessary to pull in only what you need:
6864

6965
<!-- Angular -->
70-
<script src="bower_components/angular/angular.min.js"></script>
66+
<script src="node_modules/angular-patternfly/node_modules/angular/angular.min.js"></script>
7167

7268
<!-- Angular-Bootstrap -->
73-
<script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
74-
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
69+
<script src="node_modules/angular-patternfly/node_modules/angular-ui-bootstrap/dist/ui-bootstrap.js"></script>
70+
<script src="node_modules/angular-patternfly/node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>
7571

7672
<!-- Angular-Sanitize -->
77-
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
73+
<script src="node_modules/angular-patternfly/node_modules/angular-sanitize/angular-sanitize.min.js"></script>
7874

7975
<!-- Angular-PatternFly -->
80-
<script src="bower_components/angular-patternfly/dist/angular-patternfly.min.js"></script>
76+
<script src="node_modules/angular-patternfly/dist/angular-patternfly.min.js"></script>
8177

8278
<!-- C3, D3 - Charting Libraries. Only required if you are using the 'patternfly.charts' module-->
83-
<script src="bower_components/patternfly/components/c3/c3.min.js"></script>
84-
<script src="bower_components/patternfly/components/d3/d3.min.js"></script>
79+
<script src="node_modules/angular-patternfly/node_modules/patternfly/node_modules/c3/c3.min.js"></script>
80+
<script src="node_modules/angular-patternfly/node_modules/patternfly/node_modules/d3/d3.min.js"></script>
8581

8682
5. (optional) The 'patternfly.charts' module is not a dependency in the default angular 'patternfly' module.
87-
In order to use patternfly charts you must add 'patternfly.charts' as a dependency in your application:
83+
In order to use patternfly charts you must add it as a dependency in your application:
8884

8985
my-app.module.js:
9086

@@ -93,6 +89,61 @@ Note:
9389
'patternfly.charts'
9490
]);
9591

92+
6. (optional) The 'patternfly.table' module is not a dependency in the default angular 'patternfly' module.
93+
In order to use pfTableView, you must add 'patternfly.table' as a dependency in your application:
94+
95+
my-app.module.js:
96+
97+
angular.module('myApp', [
98+
'patternfly',
99+
'patternfly.table'
100+
]);
101+
102+
Add the following CSS includes to your HTML file(s):
103+
104+
<!-- Place before any patternfly css -->
105+
<link rel="stylesheet" href="node_modules/datatables.net-dt/css/jquery.dataTables.css" />
106+
107+
Add the following Javascript includes to your HTML file(s):
108+
109+
<script src="node_modules/jquery/dist/jquery.js"></script>
110+
<script src="node_modules/datatables.net/js/jquery.dataTables.js"></script>
111+
<script src="node_modules/datatables.net-select/js/dataTables.select.js"></script>
112+
<script src="node_modules/angular-datatables/dist/angular-datatables.min.js"></script>
113+
<script src="node_modules/angular-datatables/dist/plugins/select/angular-datatables.select.min.js"></script>
114+
115+
7. (optional) The 'patternfly.canvas' module is not a dependency in the default angular 'patternfly' module.
116+
In order to use pfCanvasEditor or pfCanvas, you must add 'patternfly.canvas' as a dependency in your application:
117+
118+
my-app.module.js:
119+
120+
angular.module('myApp', [
121+
'patternfly',
122+
'patternfly.canvas'
123+
]);
124+
125+
Add the following Javascript includes to your HTML file(s):
126+
127+
<!-- jquery before angular.js -->
128+
<script src="node_modules/jquery/dist/jquery.js"></script>
129+
<script src="node_modules/components-jqueryui/jquery-ui.min.js"></script>
130+
131+
<script src="node_modules/angular/angular.js"></script>
132+
133+
<!-- angular-dragdrop after angular.js -->
134+
<script src="node_modules/angular-dragdrop/src/angular-dragdrop.js"></script>
135+
136+
Also, the canvas background grid image is located in 'node_modules/angular-patternfly/dist/imgs/canvas-dot-grid.png'
137+
please copy this image to your application's main images directory and reference it by overridding the '.canvas' css
138+
class:
139+
140+
<style>
141+
.canvas {
142+
background-image: url('/myapp/imgs/canvas-dot-grid.png');
143+
background-repeat: repeat;
144+
}
145+
</style>
146+
96147
### Using with Webpack
97148

98149
In order to use Angular-Patternfly in a Webpack-bundled application there are some things you need to keep in mind:
@@ -144,7 +195,7 @@ grunt ngdocs:view --port=8002
144195

145196
## Releasing
146197

147-
Angular PatternFly is released through Bower. To release a new version version of Angular PatternFly, edit `bower.json` and `package.json` accordingly.
198+
Angular PatternFly is released through Bower and npm. To release a new version version of Angular PatternFly, edit `bower.json` and `package.json` accordingly.
148199

149200
Update the version listed in `bower.json` by editing the file and changing the line:
150201

0 commit comments

Comments
 (0)