Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: angular/angular.js
Choose a Base Repository
angular/angular.js
Anuj16/angular.js
ArslanRafique/angular.js
DeborahK/angular.js
EpokK/angular.js
HaoWu/angular.js
IgorMinar/angular.js
JKLFA/angular.js
KAUG/angular.js
Kaic-zz/angular.js
Metric7/angular.js
MikhailTatsky/angular.js
NAzT/angular.js
Narretz/angular.js
Partoo/angular.js
PeterBoesenberg/angular.js
PoshHsu/angular.js
ScxFiction/angular.js
SeanMBe/angular.js
Sharique-Hasan/angular.js
Shipow/angular.js
SjB/angular.js
Sophrinix/angular.js
SumitMunot/angular.js
TEHEK/angular.js
abhisec/angular.js
abnerlinan/angular.js
abrons/angular.js
acosme/angular.js
adam-singer/angular.js
addyosmani/angular.js
agborkowski/angular.js
ajperrins/angular.js
alexeagle/angular.js
alxross/angular.js
aminerahmouni/angular.js
amirhhz/angular.js
angeliaz/angular.js
angularjs-jp/angular.js
anjo/angular.js
arantius/angular.js
ardnet2/angular.js
arsh-co/angular.js
bartes/angular.js
bghanchi/angular.js
blinkbox/angular.js
blueslue/angular.js
boltz/angular.js
bolu/angular.js
briceburg/angular.js
brikou/angular.js
btford/angular.js
byplayer/angular.js
ca136/angular.js
calvinhuang/angular.js
cburgdorf/angular.js
chenermeng/angular.js
chris4403/angular.js
cleyshan/angular.js
codeinpeace/angular.js
colinfrei/angular.js
congmo/angular.js
crossbreeze/angular.js
csii/angular.js
cssgist/angular.js
danielfacanha/angular.js
danilopesouza/angular.js
dankrz/angular.js
dashersw/angular.js
dbinit/angular.js
dcu/angular.js
dhl/angular.js
dineshkummarc/angular.js
dolfly/angular.js
dydycloud/angular.js
eburley/angular.js
elfgoh/angular.js
esprehn/angular.js
fergaldoyle/angular.js
fingerskier/angular.js
flamilton/angular.js
fran6co/angular.js
freewind/angular.js
gaboom/angular.js
gijs/angular.js
girikudlur/angular.js
groner/angular.js
gruber76/angular.js
gwoo/angular.js
hackreactor/angular.js
hardikdangar/angular.js
hjoest/angular.js
hkdobrev/angular.js
hoatle/angular.js
huangciyin/angular.js
huangweili/angular.js
huncent/angular.js
hwclass/angular.js
iammerrick/angular.js
ifedotov/angular.js
imaizumi8925/angular.js
imiborbas/angular.js
intelline/angular.js
jajberni/angular.js
jc1arke/angular.js
jeanielight/angular.js
jecons/angular.js
jimrenwick/angular.js
jjp/angular.js
johnlindquist/angular.js
joshkurz/angular.js
jromero75/angular.js
jsonxu/angular.js
kevan/angular.js
kevinelong/angular.js
kinglerzou/angular.js
kkurni/angular.js
kliu/angular.js
kotiya/angular.js
kyuff/angular.js
lamperwang/angular.js
leeight/angular.js
lobsang/angular.js
lrlopez/angular.js
lt1946/angular.js
ludicast/angular.js
lzlf007/angular.js
m13z/angular.js
maciejblinkbox/angular.js
mailtruck/angular.js
manuel-woelker/angular.js
mdolk/angular.js
mernen/angular.js
mgechev/angular.js
mhevery/angular.js
msgilligan/angular.js
nateabele/angular.js
nateflink/angular.js
neolf/angular.js
patcito/angular.js
pdswan/angular.js
petebacondarwin/angular.js
petrovalex/angular.js
phillipkregg/angular.js
phoo/angular.js
pmurias/angular.js
premblinkbox/angular.js
quangv/angular.js
rafa2000/angular.js
rafaalves/angular.js
rahu28/angular.js
recht/angular.js
redg1974/angular.js
ricardohbin/angular.js
rtnpro/angular.js
ruimonteiro84/angular.js
rulers/angular.js
rwaldron/angular.js
sahilmalik5/angular.js
sangam12345/angular.js
santosomar/angular.js
scuxiayiqian/angular.js
shuvozula/angular.js
shyblower/angular-ie7.js
sjhernes/angular.js
snicolai/angular.js
steinjak/angular.js
stephanebisson/angular.js
stevenp-git/angular.js
sum4me/angular.js
suneil/angular.js
supercool27/angular.js
superman-wrdh/angular.js
thegerr09/angular.js
thenyel/angular.js
thughes/angular.js
timothyx/angular.js
timthesinner/angular.js
tleruitte/angular.js
tobyreynold/angular.js
tonitt/angular.js
trochette/angular.js
unirgy/angular.js
vibster/angular.js
vincentferniot/angular.js
vingo/angular.js
virtualSharif/angular.js
vkoroslev/angular.js
vojtajina/angular.js
witkai/angular.js
woodie/angular.js
wuxq/angular.js
xiehekun/angular.js
xrchen/angular.js
yanneves/angular.js
ysiadf/angular.js
yyx990803/angular.js
zfleet/angular.js
zhangruimin/angular.js
ziakina/angular.js
Nothing to show
base: 8edece2207b5
head repository: angular/angular.js
Choose a Head Repository
angular/angular.js
Anuj16/angular.js
ArslanRafique/angular.js
DeborahK/angular.js
EpokK/angular.js
HaoWu/angular.js
IgorMinar/angular.js
JKLFA/angular.js
KAUG/angular.js
Kaic-zz/angular.js
Metric7/angular.js
MikhailTatsky/angular.js
NAzT/angular.js
Narretz/angular.js
Partoo/angular.js
PeterBoesenberg/angular.js
PoshHsu/angular.js
ScxFiction/angular.js
SeanMBe/angular.js
Sharique-Hasan/angular.js
Shipow/angular.js
SjB/angular.js
Sophrinix/angular.js
SumitMunot/angular.js
TEHEK/angular.js
abhisec/angular.js
abnerlinan/angular.js
abrons/angular.js
acosme/angular.js
adam-singer/angular.js
addyosmani/angular.js
agborkowski/angular.js
ajperrins/angular.js
alexeagle/angular.js
alxross/angular.js
aminerahmouni/angular.js
amirhhz/angular.js
angeliaz/angular.js
angularjs-jp/angular.js
anjo/angular.js
arantius/angular.js
ardnet2/angular.js
arsh-co/angular.js
bartes/angular.js
bghanchi/angular.js
blinkbox/angular.js
blueslue/angular.js
boltz/angular.js
bolu/angular.js
briceburg/angular.js
brikou/angular.js
btford/angular.js
byplayer/angular.js
ca136/angular.js
calvinhuang/angular.js
cburgdorf/angular.js
chenermeng/angular.js
chris4403/angular.js
cleyshan/angular.js
codeinpeace/angular.js
colinfrei/angular.js
congmo/angular.js
crossbreeze/angular.js
csii/angular.js
cssgist/angular.js
danielfacanha/angular.js
danilopesouza/angular.js
dankrz/angular.js
dashersw/angular.js
dbinit/angular.js
dcu/angular.js
dhl/angular.js
dineshkummarc/angular.js
dolfly/angular.js
dydycloud/angular.js
eburley/angular.js
elfgoh/angular.js
esprehn/angular.js
fergaldoyle/angular.js
fingerskier/angular.js
flamilton/angular.js
fran6co/angular.js
freewind/angular.js
gaboom/angular.js
gijs/angular.js
girikudlur/angular.js
groner/angular.js
gruber76/angular.js
gwoo/angular.js
hackreactor/angular.js
hardikdangar/angular.js
hjoest/angular.js
hkdobrev/angular.js
hoatle/angular.js
huangciyin/angular.js
huangweili/angular.js
huncent/angular.js
hwclass/angular.js
iammerrick/angular.js
ifedotov/angular.js
imaizumi8925/angular.js
imiborbas/angular.js
intelline/angular.js
jajberni/angular.js
jc1arke/angular.js
jeanielight/angular.js
jecons/angular.js
jimrenwick/angular.js
jjp/angular.js
johnlindquist/angular.js
joshkurz/angular.js
jromero75/angular.js
jsonxu/angular.js
kevan/angular.js
kevinelong/angular.js
kinglerzou/angular.js
kkurni/angular.js
kliu/angular.js
kotiya/angular.js
kyuff/angular.js
lamperwang/angular.js
leeight/angular.js
lobsang/angular.js
lrlopez/angular.js
lt1946/angular.js
ludicast/angular.js
lzlf007/angular.js
m13z/angular.js
maciejblinkbox/angular.js
mailtruck/angular.js
manuel-woelker/angular.js
mdolk/angular.js
mernen/angular.js
mgechev/angular.js
mhevery/angular.js
msgilligan/angular.js
nateabele/angular.js
nateflink/angular.js
neolf/angular.js
patcito/angular.js
pdswan/angular.js
petebacondarwin/angular.js
petrovalex/angular.js
phillipkregg/angular.js
phoo/angular.js
pmurias/angular.js
premblinkbox/angular.js
quangv/angular.js
rafa2000/angular.js
rafaalves/angular.js
rahu28/angular.js
recht/angular.js
redg1974/angular.js
ricardohbin/angular.js
rtnpro/angular.js
ruimonteiro84/angular.js
rulers/angular.js
rwaldron/angular.js
sahilmalik5/angular.js
sangam12345/angular.js
santosomar/angular.js
scuxiayiqian/angular.js
shuvozula/angular.js
shyblower/angular-ie7.js
sjhernes/angular.js
snicolai/angular.js
steinjak/angular.js
stephanebisson/angular.js
stevenp-git/angular.js
sum4me/angular.js
suneil/angular.js
supercool27/angular.js
superman-wrdh/angular.js
thegerr09/angular.js
thenyel/angular.js
thughes/angular.js
timothyx/angular.js
timthesinner/angular.js
tleruitte/angular.js
tobyreynold/angular.js
tonitt/angular.js
trochette/angular.js
unirgy/angular.js
vibster/angular.js
vincentferniot/angular.js
vingo/angular.js
virtualSharif/angular.js
vkoroslev/angular.js
vojtajina/angular.js
witkai/angular.js
woodie/angular.js
wuxq/angular.js
xiehekun/angular.js
xrchen/angular.js
yanneves/angular.js
ysiadf/angular.js
yyx990803/angular.js
zfleet/angular.js
zhangruimin/angular.js
ziakina/angular.js
Nothing to show
compare: 3d5af8850c75
  • 4 commits
  • 28 files changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 09, 2014
I incorporated the prototype detailed in gkalpak#3.

Things that are different from the prototype (besides using actual data):

 * The left sidenav (toc) is not styled properly (or even readably).
 * The subheaders in the left sidenav are not "stickying" properly (only `ng` becomes sticky).
 * Icons are missing (since we are not using FontAwesome). E.g. search-fab, toc-toggle, results
 * In the right sidenav (search) there are some unwanted horizontal scrollbars.
   (This section probably needs rethinking anyway.)
 * I have implemented a `responsiveMenu` directive to show the options in the header-menus
   (Learn/Develop/Discuss). The purpose is to show the options in a "dropdown-ish" menu on larger
   screens and using a BottomSheet on smaller. At the moment a BottomSheet is used on every
   screen-size.

Notes:

 - Still no version-picker and breadcrumbs (I have left the original implementation of those two
   commented out).
 - I have replaced the previous docs.css with a new one containing the style of the prototype.
   I have renamed the old one to `docs_old.css` and left it there temporarily for quick reference.
   We need to clean up this and the rest of the old CSS files.
 - The main content area is totally unstyled and needs some love (a lot actually).

I have also "sprinkled" the code with a few more TODOs/FIXMEs.

(For more details on known issues and missing features take a look at
 gkalpak#3)
Since the structure was a little different than the prototype,
classes/styles where not applied correctly to the links in the left
sidenav. This commit fixes the issue.

I also added FontAwesome, in order to be able to display icons until the
Material Design icon-font is released. Since this is a temporary meassure,
I didn't added as a bower dependency; just added a `font-awesome` folder
in assets and added `font-awesome/css/font-awesome.css` to the stylesheets
of each deployment (under `docs/config/services/deployments/`.
Due to the recent changes ragarding the Docs app "Materialization", some
tests where failing for the following reasons:

1. JQuery wasn't being copied to 'build/docs/components/'.
2. E2E examples 89 and 90 were relying on the Bootstrap's glyphicons.
   Temporarily replaced with FontAwesome icons; to be replaced with
   Material Design iconfont, when ready.
3. `ngMaterial` (and its various dependencies) weren't loaded by Karma
during unit testing (causing modules depending on it to fail). Added a
fake `ngMaterial` module (as a temporary solution).

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
@@ -1,6 +1,11 @@
'use strict';

angular.module('docsApp', [
'ngMaterial',
'HeaderController',
'FooterController',
'DocsController',
'ViewUtils',
'versionsData',
'pagesData',
'navData',
@@ -9,7 +14,8 @@ angular.module('docsApp', [
'examples',
'search',
'tutorials',
'versions'
'versions',
'responsiveMenu'
])

.config(['$locationProvider', function($locationProvider) {
@@ -1,22 +1,34 @@
angular.module('directives', [])

/**
* backToTop Directive
* @param {Function} $anchorScroll
* scrollTo Directive
*
* @description Ensure that the browser scrolls when the anchor is clicked
* @description
* Upon click, scroll to the target element (identified by the selector provided via the `scroll-to`
* attribute).
*/
.directive('backToTop', ['$anchorScroll', '$location', function($anchorScroll, $location) {
return function link(scope, element) {
element.on('click', function(event) {
$location.hash('');
scope.$apply($anchorScroll);
});
.directive('scrollTo', ['$document', '$location', function($document, $location) {
var doc = $document[0];

return {
restrict: 'A',
link: function scrollToPostLink(scope, elem, attrs) {
elem.on('click', onClick);

function onClick() {
var targetSelector = attrs.scrollTo;
var targetElem = doc.querySelector(targetSelector);

if (targetElem) {
targetElem.scrollIntoView();
}
}
}
};
}])


.directive('code', function() {
.directive('code', ['$window', function($window) {
return {
restrict: 'E',
terminal: true,
@@ -25,13 +37,17 @@ angular.module('directives', [])
var match = /lang-(\S+)/.exec(element[0].className);
var lang = match && match[1];
var html = element.html();
element.html(window.prettyPrintOne(html, lang, linenums));
element.html($window.prettyPrintOne(html, lang, linenums));
}
};
})
}])


// TODO: Probably not needed any more
.directive('scrollYOffsetElement', ['$anchorScroll', function($anchorScroll) {
return function(scope, element) {
$anchorScroll.yOffset = element;
return {
link: function(scope, element) {
$anchorScroll.yOffset = element;
}
};
}]);
@@ -1,15 +1,21 @@
angular.module('DocsController', [])
angular.module('DocsController', ['ViewUtils'])

.controller('DocsController', [
'$scope', '$rootScope', '$location', '$window', 'openPlunkr',
'$scope', '$rootScope', '$location', '$window', 'openPlunkr', 'ViewUtils',
'NG_PAGES', 'NG_NAVIGATION', 'NG_VERSION',
function($scope, $rootScope, $location, $window, openPlunkr,
function($scope, $rootScope, $location, $window, openPlunkr, ViewUtils,
NG_PAGES, NG_NAVIGATION, NG_VERSION) {

$scope.vu = ViewUtils;

$scope.openPlunkr = openPlunkr;

$scope.docsVersion = NG_VERSION.isSnapshot ? 'snapshot' : NG_VERSION.version;

$scope.isCurrentPath = function(path) {
return this.currentPage && path && (this.currentPage.path === path);
};

$scope.navClass = function(navItem) {
return {
active: navItem.href && this.currentPage && this.currentPage.path,
@@ -25,13 +31,13 @@ angular.module('DocsController', [])
$window._gaq.push(['_trackPageview', pagePath]);
});

$scope.$watch(function docsPathWatch() {return $location.path(); }, function docsPathWatchAction(path) {
$scope.$watch(function docsPathWatch() { return $location.path(); }, function docsPathWatchAction(path) {

path = path.replace(/^\/?(.+?)(\/index)?\/?$/, '$1');

currentPage = $scope.currentPage = NG_PAGES[path];
var currentPage = $scope.currentPage = NG_PAGES[path];

if ( currentPage ) {
if (currentPage) {
$scope.partialPath = 'partials/' + path + '.html';
$scope.currentArea = NG_NAVIGATION[currentPage.area];
var pathParts = currentPage.path.split('/');
@@ -53,8 +59,6 @@ angular.module('DocsController', [])
Initialize
***********************************/

$scope.versionNumber = angular.version.full;
$scope.version = angular.version.full + " " + angular.version.codeName;
$scope.loading = 0;


@@ -1,23 +1,23 @@
angular.module('errors', ['ngSanitize'])

.filter('errorLink', ['$sanitize', function ($sanitize) {
.filter('errorLink', ['$sanitize', function($sanitize) {
var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}<>]/g,
MAILTO_REGEXP = /^mailto:/,
STACK_TRACE_REGEXP = /:\d+:\d+$/;

var truncate = function (text, nchars) {
var truncate = function(text, nchars) {
if (text.length > nchars) {
return text.substr(0, nchars - 3) + '...';
}
return text;
};

return function (text, target) {
return function(text, target) {
var targetHtml = target ? ' target="' + target + '"' : '';

if (!text) return text;

return $sanitize(text.replace(LINKY_URL_REGEXP, function (url) {
return $sanitize(text.replace(LINKY_URL_REGEXP, function(url) {
if (STACK_TRACE_REGEXP.test(url)) {
return url;
}
@@ -48,10 +48,10 @@ angular.module('errors', ['ngSanitize'])
};

return {
link: function (scope, element, attrs) {
link: function(scope, element, attrs) {
var search = $location.search(),
formatArgs = [attrs.errorDisplay],
i;
formatArgs = [attrs.errorDisplay],
i;

for (i = 0; angular.isDefined(search['p'+i]); i++) {
formatArgs.push(search['p'+i]);
@@ -2,7 +2,7 @@ angular.module('examples', [])

.factory('formPostData', ['$document', function($document) {
return function(url, fields) {
/**
/*
* Form previously posted to target="_blank", but pop-up blockers were causing this to not work.
* If a user chose to bypass pop-up blocker one time and click the link, they would arrive at
* a new default plnkr, not a plnkr with the desired template.
@@ -48,7 +48,7 @@ angular.module('examples', [])
// The manifests provide the production index file but Plunkr wants
// a straight index.html
if (filename === "index-production.html") {
filename = "index.html"
filename = "index.html";
}

return {
@@ -0,0 +1,9 @@
angular.
module('FooterController', []).
controller('FooterController', FooterController);

function FooterController() {
var v = angular.version;
this.versionNumber = v.full;
this.version = v.full + ' ' + v.codeName;
}
@@ -0,0 +1,35 @@
angular.
module('HeaderController', []).
controller('HeaderController', HeaderController);

HeaderController.$inject = [];
function HeaderController() {
this.learnItems = [
{label: 'Why AngularJS?', url: '//angularjs.org/'},
{label: 'Watch', url: '//www.youtube.com/user/angularjs'},
{label: 'Tutorial', url: 'tutorial'},
{label: 'Case Studies', url: '//builtwith.angularjs.org/'},
{label: 'Seed App project template', url: '//github.com/angular/angular-seed'},
{label: 'FAQ', url: 'misc/faq'}
];

this.developItems = [
{label: 'Why AngularJS?', url: '//angularjs.org/'},
{label: 'Tutorial', url: 'tutorial'},
{label: 'Developer Guide', url: 'guide'},
{label: 'API Reference', url: 'api'},
{label: 'Error Reference', url: 'error'},
{label: 'Contribute', url: 'misc/contribute'},
{label: 'Download', url: '//code.angularjs.org/'}
];

this.discussItems = [
{label: 'Blog', url: '//blog.angularjs.org'},
{label: 'Mailing List', url: '//groups.google.com/group/angular'},
{label: 'Chat Room', url: '//webchat.freenode.net/?channels=angularjs&uio=d4'},
{label: 'Twitter', url: '//twitter.com/#!/angularjs'},
{label: 'Google+', url: '//plus.google.com/110323587230527980117'},
{label: 'GitHub', url: '//github.com/angular/angular.js'},
{label: 'Issue Tracker', url: '//github.com/angular/angular.js/issues'},
];
}
@@ -0,0 +1,55 @@
angular.
module('responsiveMenu', ['ngMaterial', 'ViewUtils']).
directive('responsiveMenu', responsiveMenuDirective);

responsiveMenuDirective.$inject = ['$mdBottomSheet', 'ViewUtils'];
function responsiveMenuDirective($mdBottomSheet, ViewUtils) {
// TODO: Create showFns for various sizes (not necessarily all)
var showFns = {
// 'gt-lg': '',
// 'lg': '',
// 'md': '',
'sm': function showSmFn(items) {
$mdBottomSheet.show({
template: _getResponsiveMenuSmTemplate(),
controller: ['$mdBottomSheet', '$scope',
function ResponsiveMenuSmController($mdBottomSheet, $scope) {
$scope.items = items;
$scope.onItemClick = $mdBottomSheet.hide.bind($mdBottomSheet);
}
]
});
}
};

var defaultShowFn = showFns.sm;

return {
restrict: 'A',
scope: {
items: '=rmItems'
},
controller: ['$element', '$scope', function ResponsiveMenuController($element, $scope) {
$element.on('click', onClick.bind(this));

function onClick(evt) {
var showFn = ViewUtils.getValueForSize(showFns, defaultShowFn);
showFn($scope.items);
}
}]
};
}

function _getResponsiveMenuSmTemplate() {
return [
'<md-bottom-sheet>',
' <md-list>',
' <md-item ng-repeat="item in items">',
' <md-button aria-label="{{item.label}}" ng-click="onItemClick(item)">',
' <a ng-href="{{item.url}}">{{item.label}}</a>',
' </md-button>',
' </md-item>',
' </md-list>',
'</md-bottom-sheet>',
''].join('\n');
}

No commit comments for this range

You can’t perform that action at this time.