Skip to content

Commit

Permalink
update todomvc-common to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Sawchuk committed Nov 3, 2014
1 parent b785628 commit 65ef22f
Show file tree
Hide file tree
Showing 189 changed files with 1,788 additions and 1,931 deletions.
2 changes: 1 addition & 1 deletion examples/agilityjs/bower.json
Expand Up @@ -2,7 +2,7 @@
"name": "agilityjs",
"version": "0.0.0",
"dependencies": {
"todomvc-common": "~0.1.4",
"todomvc-common": "~0.3.0",
"agility": "~0.1.3",
"jquery": "~1.9.1"
}
Expand Down
35 changes: 26 additions & 9 deletions examples/agilityjs/bower_components/todomvc-common/base.js
Expand Up @@ -171,25 +171,42 @@
framework = document.querySelector('[data-framework]').dataset.framework;
}

this.template = template;

if (template && learnJSON[framework]) {
if (learnJSON.backend) {
this.frameworkJSON = learnJSON.backend;
this.append({
backend: true
});
} else if (learnJSON[framework]) {
this.frameworkJSON = learnJSON[framework];
this.template = template;

this.append();
}
}

Learn.prototype.append = function () {
Learn.prototype.append = function (opts) {
var aside = document.createElement('aside');
aside.innerHTML = _.template(this.template, this.frameworkJSON);
aside.className = 'learn';

// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
});
if (opts && opts.backend) {
// Remove demo link
var sourceLinks = aside.querySelector('.source-links');
var heading = sourceLinks.firstElementChild;
var sourceLink = sourceLinks.lastElementChild;
// Correct link path
var href = sourceLink.getAttribute('href');
sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http')));
sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML;
} else {
// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
if (demoLink.getAttribute('href').substr(0, 4) !== 'http') {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
}
});
}

document.body.className = (document.body.className + ' learn-bar').trim();
document.body.insertAdjacentHTML('afterBegin', aside.outerHTML);
Expand Down
22 changes: 0 additions & 22 deletions examples/agilityjs/bower_components/todomvc-common/bower.json

This file was deleted.

35 changes: 26 additions & 9 deletions examples/ampersand/todomvc-common/base.js
Expand Up @@ -171,25 +171,42 @@
framework = document.querySelector('[data-framework]').dataset.framework;
}

this.template = template;

if (template && learnJSON[framework]) {
if (learnJSON.backend) {
this.frameworkJSON = learnJSON.backend;
this.append({
backend: true
});
} else if (learnJSON[framework]) {
this.frameworkJSON = learnJSON[framework];
this.template = template;

this.append();
}
}

Learn.prototype.append = function () {
Learn.prototype.append = function (opts) {
var aside = document.createElement('aside');
aside.innerHTML = _.template(this.template, this.frameworkJSON);
aside.className = 'learn';

// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
});
if (opts && opts.backend) {
// Remove demo link
var sourceLinks = aside.querySelector('.source-links');
var heading = sourceLinks.firstElementChild;
var sourceLink = sourceLinks.lastElementChild;
// Correct link path
var href = sourceLink.getAttribute('href');
sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http')));
sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML;
} else {
// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
if (demoLink.getAttribute('href').substr(0, 4) !== 'http') {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
}
});
}

document.body.className = (document.body.className + ' learn-bar').trim();
document.body.insertAdjacentHTML('afterBegin', aside.outerHTML);
Expand Down
2 changes: 1 addition & 1 deletion examples/angular-dart/bower.json
Expand Up @@ -15,6 +15,6 @@
"tests"
],
"dependencies": {
"todomvc-common": "~0.1.9"
"todomvc-common": "~0.3.0"
}
}
35 changes: 26 additions & 9 deletions examples/angular-dart/bower_components/todomvc-common/base.js
Expand Up @@ -171,25 +171,42 @@
framework = document.querySelector('[data-framework]').dataset.framework;
}

this.template = template;

if (template && learnJSON[framework]) {
if (learnJSON.backend) {
this.frameworkJSON = learnJSON.backend;
this.append({
backend: true
});
} else if (learnJSON[framework]) {
this.frameworkJSON = learnJSON[framework];
this.template = template;

this.append();
}
}

Learn.prototype.append = function () {
Learn.prototype.append = function (opts) {
var aside = document.createElement('aside');
aside.innerHTML = _.template(this.template, this.frameworkJSON);
aside.className = 'learn';

// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
});
if (opts && opts.backend) {
// Remove demo link
var sourceLinks = aside.querySelector('.source-links');
var heading = sourceLinks.firstElementChild;
var sourceLink = sourceLinks.lastElementChild;
// Correct link path
var href = sourceLink.getAttribute('href');
sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http')));
sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML;
} else {
// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
if (demoLink.getAttribute('href').substr(0, 4) !== 'http') {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
}
});
}

document.body.className = (document.body.className + ' learn-bar').trim();
document.body.insertAdjacentHTML('afterBegin', aside.outerHTML);
Expand Down
22 changes: 0 additions & 22 deletions examples/angular-dart/bower_components/todomvc-common/bower.json

This file was deleted.

2 changes: 1 addition & 1 deletion examples/angularjs-perf/bower.json
Expand Up @@ -3,6 +3,6 @@
"version": "0.0.0",
"dependencies": {
"angular": "1.2.9",
"todomvc-common": "~0.1.9"
"todomvc-common": "~0.3.0"
}
}
22 changes: 0 additions & 22 deletions examples/angularjs/bower_components/todomvc-common/bower.json

This file was deleted.

2 changes: 1 addition & 1 deletion examples/angularjs_require/bower.json
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"dependencies": {
"angular": "1.2.8",
"todomvc-common": "~0.1.9",
"todomvc-common": "~0.3.0",
"requirejs": "~2.1.9"
}
}
2 changes: 1 addition & 1 deletion examples/ariatemplates/bower.json
Expand Up @@ -2,6 +2,6 @@
"name": "todomvc-ariatemplates",
"version": "0.0.0",
"dependencies": {
"todomvc-common": "~0.1.6"
"todomvc-common": "~0.3.0"
}
}
35 changes: 26 additions & 9 deletions examples/ariatemplates/bower_components/todomvc-common/base.js
Expand Up @@ -171,25 +171,42 @@
framework = document.querySelector('[data-framework]').dataset.framework;
}

this.template = template;

if (template && learnJSON[framework]) {
if (learnJSON.backend) {
this.frameworkJSON = learnJSON.backend;
this.append({
backend: true
});
} else if (learnJSON[framework]) {
this.frameworkJSON = learnJSON[framework];
this.template = template;

this.append();
}
}

Learn.prototype.append = function () {
Learn.prototype.append = function (opts) {
var aside = document.createElement('aside');
aside.innerHTML = _.template(this.template, this.frameworkJSON);
aside.className = 'learn';

// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
});
if (opts && opts.backend) {
// Remove demo link
var sourceLinks = aside.querySelector('.source-links');
var heading = sourceLinks.firstElementChild;
var sourceLink = sourceLinks.lastElementChild;
// Correct link path
var href = sourceLink.getAttribute('href');
sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http')));
sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML;
} else {
// Localize demo links
var demoLinks = aside.querySelectorAll('.demo-link');
Array.prototype.forEach.call(demoLinks, function (demoLink) {
if (demoLink.getAttribute('href').substr(0, 4) !== 'http') {
demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href'));
}
});
}

document.body.className = (document.body.className + ' learn-bar').trim();
document.body.insertAdjacentHTML('afterBegin', aside.outerHTML);
Expand Down
22 changes: 0 additions & 22 deletions examples/ariatemplates/bower_components/todomvc-common/bower.json

This file was deleted.

2 changes: 1 addition & 1 deletion examples/atmajs/bower.json
Expand Up @@ -2,7 +2,7 @@
"name": "todomvc-atmajs",
"version": "0.1.0",
"dependencies": {
"todomvc-common": "~0.1.4",
"todomvc-common": "~0.3.0",
"jquery": "~2.0.2",
"maskjs": "~0.10.1",
"includejs": "~0.9.10",
Expand Down

0 comments on commit 65ef22f

Please sign in to comment.