2015-03-01 09:42:31 -05:00
|
|
|
var angularIO = angular.module('angularIOApp', ['ngMaterial'])
|
2015-02-24 09:38:30 -05:00
|
|
|
.config(function($mdThemingProvider) {
|
|
|
|
$mdThemingProvider.theme('default')
|
|
|
|
.primaryPalette('blue', {
|
|
|
|
'default': '700', // by default use shade 400 from the pink palette for primary intentions
|
|
|
|
'hue-1': '100', // use shade 100 for the <code>md-hue-1</code> class
|
|
|
|
'hue-2': '600', // use shade 600 for the <code>md-hue-2</code> class
|
|
|
|
'hue-3': 'A100' // use shade A100 for the <code>md-hue-3</code> class
|
|
|
|
})
|
|
|
|
// If you specify less than all of the keys, it will inherit from the
|
|
|
|
// default shades
|
|
|
|
.accentPalette('purple', {
|
|
|
|
'default': '200' // use shade 200 for default, and keep all other shades the same
|
|
|
|
});
|
|
|
|
});
|
2015-02-19 12:51:07 -05:00
|
|
|
|
2015-03-03 17:22:30 -05:00
|
|
|
|
2015-03-04 23:27:30 -05:00
|
|
|
/*
|
|
|
|
* Apllication Controller
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
angularIO.controller('AppCtrl', ['$scope', '$mdDialog', function($scope, $mdDialog){
|
|
|
|
|
|
|
|
// TOGGLE MAIN NAV (TOP) ON MOBILE
|
2015-03-05 00:21:59 -05:00
|
|
|
$scope.toggleDocsMenu = function(event) {
|
|
|
|
$scope.showDocsNav = !$scope.showDocsNav;
|
|
|
|
};
|
|
|
|
|
|
|
|
// TOGGLE DOCS NAV
|
2015-03-04 23:27:30 -05:00
|
|
|
$scope.toggleMainMenu = function(event) {
|
|
|
|
$scope.showMainNav = !$scope.showMainNav;
|
2015-02-19 12:51:07 -05:00
|
|
|
};
|
2015-03-01 09:42:31 -05:00
|
|
|
|
2015-03-04 23:27:30 -05:00
|
|
|
// TOGGLE DOCS VERSION & LANGUAGE
|
2015-03-03 17:22:30 -05:00
|
|
|
$scope.toggleVersionMenu = function(event) {
|
|
|
|
$scope.showMenu = !$scope.showMenu;
|
2015-03-01 09:42:31 -05:00
|
|
|
};
|
2015-03-01 23:00:19 -05:00
|
|
|
|
2015-03-04 23:27:30 -05:00
|
|
|
// SHOW FULL ABOUT US PAGE BIO
|
2015-03-02 02:48:31 -05:00
|
|
|
$scope.showBio = function (event) {
|
2015-03-05 02:22:06 -05:00
|
|
|
var person = angular.element(event.currentTarget);
|
|
|
|
var bio = person.text();
|
|
|
|
var name = person.attr('data-name');
|
|
|
|
//var pic = person.data('data-pic');
|
2015-03-02 02:48:31 -05:00
|
|
|
|
|
|
|
$mdDialog.show(
|
|
|
|
$mdDialog.alert()
|
2015-03-05 02:22:06 -05:00
|
|
|
.title(name)
|
2015-03-02 02:48:31 -05:00
|
|
|
.content(bio)
|
2015-03-02 10:15:03 -05:00
|
|
|
.ariaLabel('Biography')
|
|
|
|
.ok('Close Bio')
|
2015-03-02 02:48:31 -05:00
|
|
|
.targetEvent(event)
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2015-03-05 00:21:59 -05:00
|
|
|
// INITIALIZE PRETTY PRINT
|
2015-03-01 23:00:19 -05:00
|
|
|
prettyPrint();
|
2015-02-24 09:38:30 -05:00
|
|
|
}]);
|
|
|
|
|
|
|
|
|