Skip to content
Browse files

Cleaned up name spacing and fixed link to backup jQuery

  • Loading branch information...
1 parent 59efead commit 33ee045badb5cd84c275a35cb74e698580b4e8e7 @ten1seven committed
Showing with 18 additions and 20 deletions.
  1. BIN img/favicon.ico
  2. +1 −3 index.html
  3. +4 −4 js/bootstrap.js
  4. +6 −6 js/global.js
  5. +2 −2 js/init.js
  6. +5 −5 js/pages/home.js
View
BIN img/favicon.ico
Binary file not shown.
View
4 index.html
@@ -14,9 +14,7 @@
<!-- tell mobile browsers to scale -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>Time Life</title>
-
- <link rel="shortcut icon" href="img/favicon.ico">
+ <title>Project Boilerplate</title>
<!-- CSS: implied media="all" -->
<link rel="stylesheet" href="css/base.css">
View
8 js/bootstrap.js
@@ -4,15 +4,15 @@
Author: Jeremy Fields, Viget Labs
*/
-var TL = TL || {};
+var PB = PB || {};
(function() {
var body = document.body;
- TL.controller = body.getAttribute('data-controller').toLowerCase();
- TL.action = body.getAttribute('data-action').toLowerCase();
+ PB.controller = body.getAttribute('data-controller').toLowerCase();
+ PB.action = body.getAttribute('data-action').toLowerCase();
})();
-TL.loadScripts = function(controller,action) {
+PB.loadScripts = function(controller,action) {
$LAB.script([_base._global,pages[controller][action].depends],pages[controller][action].url);
};
View
12 js/global.js
@@ -4,13 +4,13 @@
Author: Jeremy Fields, Viget Labs
*/
-var TL = TL || {};
+var PB = PB || {};
(function () {
'use strict';
- TL.Util = {
+ PB.Util = {
'init': function() {
@@ -20,16 +20,16 @@ var TL = TL || {};
};
- TL.Global = {
+ PB.Global = {
vars: {
- var1: 'hello world!'
+ var1: 'global.js init'
},
'init': function() {
// do stuff here
- log(this.vars.var1);
+ console.log(PB.Global.var1);
},
@@ -44,4 +44,4 @@ var TL = TL || {};
}());
-$(function() { TL.Global.init() });
+$(function() { PB.Global.init() });
View
4 js/init.js
@@ -8,10 +8,10 @@ $LAB.script('//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js','js/bootstr
if (typeof window.jQuery === 'undefined') {
// first load failed, load local fallback, then dependencies
- $LAB.script('js/jquery.min.js').wait(TL.loadScripts(TL.controller,TL.action));
+ $LAB.script('js/libs/jquery-1.7.2.min.js').wait(PB.loadScripts(PB.controller,PB.action));
} else {
// first load was a success, proceed to loading dependencies
- TL.loadScripts(TL.controller,TL.action);
+ PB.loadScripts(PB.controller,PB.action);
}
});
View
10 js/pages/home.js
@@ -4,22 +4,22 @@
Author: Jeremy Fields, Viget Labs
*/
-var TL = TL || {};
+var PB = PB || {};
(function () {
'use strict';
- TL.Home = {
+ PB.Home = {
vars: {
- var1: 'hello from the home page!'
+ var1: 'home.js init'
},
'init': function() {
// do stuff here
- log(this.vars.var1);
+ console.log(PB.Home.vars.var1);
},
@@ -34,4 +34,4 @@ var TL = TL || {};
}());
-$(function() { TL.Home.init() });
+$(function() { PB.Home.init() });

0 comments on commit 33ee045

Please sign in to comment.
Something went wrong with that request. Please try again.