Skip to content

Upgrade to Angular 1.3 Only #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ module.exports = function (grunt) {
'lib/patternfly/components/bootstrap-treeview/src/js/bootstrap-treeview.js',
'lib/patternfly/components/c3/c3.js',
'lib/patternfly/components/d3/d3.js',
'angular.js',
'lib/angular/angular.js',
'lib/angular-animate/angular-animate.js',
'dist/angular-patternfly.js',
'lib/patternfly/dist/js/patternfly.js'],
html5Mode: false,
Expand Down
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
"url": "git://github.com/patternfly/angular-patternfly.git"
},
"dependencies": {
"angular": "1.2.25 - 1.3.*"
"angular": "1.3.*"
},
"devDependencies": {
"angular-animate": "1.2.25 - 1.3.*",
"angular-mocks": "1.2.25 - 1.3.*",
"angular-sanitize": "1.2.25 - 1.3.*",
"angular-touch": "1.2.25 - 1.3.*",
"angular-route": "1.2.25 - 1.3.*",
"angular-animate": "1.3.*",
"angular-mocks": "1.3.*",
"angular-sanitize": "1.3.*",
"angular-touch": "1.3.*",
"angular-route": "1.3.*",
"patternfly": "~2.0.0"
}
}
78 changes: 45 additions & 33 deletions dist/angular-patternfly.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ angular.module('patternfly.card').directive('pfCard', function () {
* @param {expression} config the c3 configuration options for the chart
*
* @example
<example module="patternfly.charts">
<example module="patternfly.charts">
<file name="index.html">
<div ng-controller="ChartCtrl">
<div pf-c3-chart id="chartId" config="chartConfig"></div>
Expand All @@ -269,7 +269,9 @@ angular.module('patternfly.card').directive('pfCard', function () {
</file>

<file name="script.js">
function ChartCtrl($scope) {

angular.module( 'patternfly.charts' )
.controller( 'ChartCtrl', ['$scope', function( $scope ) {
$scope.used = 950;
$scope.total = 1000;
$scope.available = $scope.total - $scope.used;
Expand Down Expand Up @@ -302,7 +304,7 @@ angular.module('patternfly.card').directive('pfCard', function () {
$scope.updateAvailable();
$scope.chartConfig.data.columns = [["Used",$scope.used],["Available",$scope.available]];
};
}
}]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: these closing brackets and the parenthesis don't line up with the angular.module above. This is also visible in the docs examples.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

</file>
</example>
*/
Expand Down Expand Up @@ -458,8 +460,8 @@ angular.module('patternfly.card').directive('pfCard', function () {
</file>

<file name="script.js">
function ChartCtrl($scope) {

angular.module( 'patternfly.charts' )
.controller( 'ChartCtrl', ['$scope', function( $scope ) {
$scope.config = {
'chartId': 'chartA',
'units': 'GB',
Expand Down Expand Up @@ -541,8 +543,7 @@ angular.module('patternfly.card').directive('pfCard', function () {
'used': '670',
'total': '1000'
};

};
}]);
</file>
</example>
*/
Expand Down Expand Up @@ -811,7 +812,8 @@ angular.module('patternfly.charts').directive('pfDonutPctChart', ['c3ChartDefaul
</file>

<file name="script.js">
function ChartCtrl($scope) {
angular.module( 'patternfly.charts' )
.controller( 'ChartCtrl', ['$scope', function( $scope ) {

$scope.config = {
'chartId': 'exampleSparkline',
Expand All @@ -838,7 +840,7 @@ angular.module('patternfly.charts').directive('pfDonutPctChart', ['c3ChartDefaul
$scope.data.xData.push(new Date($scope.data.xData[$scope.data.xData.length - 1].getTime() + (24 * 60 * 60 * 1000)));
$scope.data.yData.push(Math.round(Math.random() * 100));
};
};
}]);
</file>
</example>
*/
Expand Down Expand Up @@ -1161,7 +1163,8 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ['c3ChartDefau
</file>

<file name="script.js">
function ChartCtrl($scope) {
angular.module( 'patternfly.charts' )
.controller( 'ChartCtrl', ['$scope', function( $scope ) {

$scope.config = {
title: 'Memory',
Expand Down Expand Up @@ -1203,7 +1206,7 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ['c3ChartDefau
$scope.data.xData.push(newDate);
$scope.data.yData.push(newData);
};
};
}]);
</file>
</example>
*/
Expand Down Expand Up @@ -1280,7 +1283,9 @@ angular.module('patternfly.charts').directive('pfUtilizationChart',
</file>

<file name="script.js">
function FormDemoCtrl ($scope) {

angular.module( 'patternfly.form' )
.controller( 'FormDemoCtrl', ['$scope', function( $scope ) {
$scope.setToday = function () {
$scope.date = new Date();
}
Expand All @@ -1290,7 +1295,7 @@ angular.module('patternfly.charts').directive('pfUtilizationChart',
todayBtn: 'linked',
todayHighlight: true
};
}
}]);
</file>
</example>
*/
Expand Down Expand Up @@ -1363,7 +1368,8 @@ angular.module('patternfly.form').directive('pfDatepicker', function () {
</file>

<file name="script.js">
function FormButtonCtrl ($scope, $timeout) {
angular.module( 'patternfly.form' )
.controller( 'FormButtonCtrl', ['$scope', '$timeout', function( $scope, $timeout ) {
$scope.status = 'Not yet Saved'
$scope.working = false;

Expand All @@ -1380,7 +1386,7 @@ angular.module('patternfly.form').directive('pfDatepicker', function () {
$scope.status = 'cancelled';
$scope.input = null;
};
}
}]);
</file>
</example>
*/
Expand Down Expand Up @@ -1455,12 +1461,13 @@ angular.module('patternfly.form').directive('pfFormButtons', function () {
</file>

<file name="script.js">
function FormDemoCtrl ($scope) {
angular.module( 'patternfly.form' )
.controller( 'FormDemoCtrl', ['$scope', function( $scope ) {
$scope.item = {
name: 'Homer Simpson',
description: 'I like donuts and Duff. Doh!'
};
}
}]);
</file>
</example>
*/
Expand Down Expand Up @@ -1593,7 +1600,8 @@ angular.module('patternfly.form').directive('pfFormGroup', function () {
</file>

<file name="script.js">
function NotificationDemoCtrl($scope, Notifications) {
angular.module( 'patternfly.notification' )
.controller( 'NotificationDemoCtrl', ['$scope', 'Notifications', function( $scope, Notifications ) {

var typeMap = { 'Info': Notifications.info,
'Success': Notifications.success,
Expand All @@ -1608,7 +1616,7 @@ angular.module('patternfly.form').directive('pfFormGroup', function () {
$scope.notify = function () {
typeMap[$scope.type]($scope.message);
}
}
}]);
</file>

</example>
Expand Down Expand Up @@ -1709,7 +1717,7 @@ angular.module('patternfly.notification', []).provider('Notifications', function
return notifications;
}];

})
});

/**
* @ngdoc directive
Expand Down Expand Up @@ -1767,19 +1775,21 @@ angular.module('patternfly.notification', []).provider('Notifications', function
</file>

<file name="script.js">
function NotificationDemoCtrl($scope) {

angular.module( 'patternfly.notification' )
.controller( 'NotificationDemoCtrl', ['$scope', 'Notifications', function( $scope, Notifications ) {
$scope.types = ['success','info','danger', 'warning'];
$scope.type = $scope.types[0];
$scope.isPersistent = false;

$scope.header = 'Default Header.';
$scope.message = 'Default Message.';
}
}]);
</file>

</example>
*/
.directive('pfNotification', function () {
angular.module( 'patternfly.notification' ).directive('pfNotification', function () {
'use strict';

return {
Expand All @@ -1793,7 +1803,7 @@ angular.module('patternfly.notification', []).provider('Notifications', function
restrict: 'E',
templateUrl: 'notification/notification.html'
};
})
});
/**
* @ngdoc directive
* @name patternfly.notification:pfNotificationList
Expand Down Expand Up @@ -1833,8 +1843,8 @@ angular.module('patternfly.notification', []).provider('Notifications', function
</file>

<file name="script.js">
function NotificationDemoCtrl($scope, Notifications) {

angular.module( 'patternfly.notification' )
.controller( 'NotificationDemoCtrl', ['$scope', 'Notifications', function( $scope, Notifications ) {
$scope.message = 'Default Message.';

var typeMap = { 'Info': Notifications.info,
Expand All @@ -1850,12 +1860,12 @@ angular.module('patternfly.notification', []).provider('Notifications', function
$scope.notify = function () {
typeMap[$scope.type]($scope.message);
}
}
}]);
</file>

</example>
*/
.directive('pfNotificationList', function () {
angular.module( 'patternfly.notification' ).directive('pfNotificationList', function () {
'use strict';

return {
Expand Down Expand Up @@ -1918,11 +1928,12 @@ angular.module('patternfly.notification', []).provider('Notifications', function
</file>

<file name="script.js">
function SelectDemoCtrl($scope) {
angular.module( 'patternfly.select' )
.controller( 'SelectDemoCtrl', ['$scope', function( $scope ) {
$scope.drinks = ['tea', 'coffee', 'water'];
$scope.pets = ['Dog', 'Cat', 'Chicken'];
$scope.pet = $scope.pets[0];
}
}]);
</file>

</example>
Expand Down Expand Up @@ -2017,7 +2028,8 @@ angular.module('patternfly.select', []).directive('pfSelect', function ($timeout
</file>

<file name="script.js">
function ValidationDemoCtrl($scope) {
angular.module( 'patternfly.validation' )
.controller( 'ValidationDemoCtrl', ['$scope', function( $scope ) {
$scope.myValue = "Change this value to be a number";
$scope.myValueValid = 42;
$scope.isValidationDisabled = false;
Expand All @@ -2029,7 +2041,7 @@ angular.module('patternfly.select', []).directive('pfSelect', function ($timeout

return true;
}
}
}]);
</file>

</example>
Expand Down Expand Up @@ -2183,7 +2195,7 @@ angular.module('patternfly.validation', []).directive('pfValidation', function (


$templateCache.put('notification/notification.html',
"<div class=\"alert alert-{{pfNotificationType}}\"><button ng-show=pfNotificationPersistent type=button class=close ng-click=$parent.notifications.remove($index)><span aria-hidden=true>&times;</span><span class=sr-only>Close</span></button> <span class=\"pficon pficon-ok\" ng-show=\"pfNotificationType == 'success'\"></span> <span class=\"pficon pficon-info\" ng-show=\"pfNotificationType == 'info'\"></span> <span class=pficon-layered ng-show=\"pfNotificationType == 'danger'\"><span class=\"pficon pficon-error-octagon\"></span> <span class=\"pficon pficon-error-exclamation\"></span></span> <span class=pficon-layered ng-show=\"pfNotificationType == 'warning'\"><span class=\"pficon pficon-warning-triangle\"></span> <span class=\"pficon pficon-warning-exclamation\"></span></span> <strong>{{pfNotificationHeader}}</strong> {{pfNotificationMessage}}</div>"
"<div class=\"alert alert-{{pfNotificationType}}\"><button ng-show=pfNotificationPersistent type=button class=close ng-click=$parent.notifications.remove($index)><span aria-hidden=true>&times;</span><span class=sr-only>Close</span></button> <span class=\"pficon pficon-ok\" ng-show=\"pfNotificationType === 'success'\"></span> <span class=\"pficon pficon-info\" ng-show=\"pfNotificationType === 'info'\"></span> <span class=\"pficon pficon-error-circle-o\" ng-show=\"pfNotificationType === 'danger'\"></span> <span class=\"pficon pficon-warning-triangle-o\" ng-show=\"pfNotificationType === 'warning'\"></span> <strong>{{pfNotificationHeader}}</strong> {{pfNotificationMessage}}</div>"
);

}]);
2 changes: 1 addition & 1 deletion dist/angular-patternfly.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"grunt-eslint": "^17.1.0",
"grunt-htmlhint": "0.4.1",
"grunt-karma": "0.8.3",
"grunt-ngdocs": "0.2.5",
"grunt-ngdocs": "0.2.9",
"karma": "0.12.23",
"karma-chrome-launcher": "0.1.4",
"karma-firefox-launcher": "0.1.3",
Expand Down
8 changes: 5 additions & 3 deletions src/charts/c3/c3-chart.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @param {expression} config the c3 configuration options for the chart
*
* @example
<example module="patternfly.charts">
<example module="patternfly.charts">
<file name="index.html">
<div ng-controller="ChartCtrl">
<div pf-c3-chart id="chartId" config="chartConfig"></div>
Expand All @@ -30,7 +30,9 @@
</file>

<file name="script.js">
function ChartCtrl($scope) {

angular.module( 'patternfly.charts' )
.controller( 'ChartCtrl', ['$scope', function( $scope ) {
$scope.used = 950;
$scope.total = 1000;
$scope.available = $scope.total - $scope.used;
Expand Down Expand Up @@ -63,7 +65,7 @@
$scope.updateAvailable();
$scope.chartConfig.data.columns = [["Used",$scope.used],["Available",$scope.available]];
};
}
}]);
</file>
</example>
*/
Expand Down
7 changes: 3 additions & 4 deletions src/charts/donut/donut-pct-chart-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
</file>

<file name="script.js">
function ChartCtrl($scope) {

angular.module( 'patternfly.charts' )
.controller( 'ChartCtrl', ['$scope', function( $scope ) {
$scope.config = {
'chartId': 'chartA',
'units': 'GB',
Expand Down Expand Up @@ -207,8 +207,7 @@
'used': '670',
'total': '1000'
};

};
}]);
</file>
</example>
*/
Expand Down
5 changes: 3 additions & 2 deletions src/charts/sparkline/sparkline-chart.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
</file>

<file name="script.js">
function ChartCtrl($scope) {
angular.module( 'patternfly.charts' )
.controller( 'ChartCtrl', ['$scope', function( $scope ) {

$scope.config = {
'chartId': 'exampleSparkline',
Expand All @@ -135,7 +136,7 @@
$scope.data.xData.push(new Date($scope.data.xData[$scope.data.xData.length - 1].getTime() + (24 * 60 * 60 * 1000)));
$scope.data.yData.push(Math.round(Math.random() * 100));
};
};
}]);
</file>
</example>
*/
Expand Down
Loading