summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/site
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-07-17 14:51:29 -0400
committerJules Laplace <jules@okfoc.us>2014-07-17 14:51:29 -0400
commitc8874c54bc445fa05d37d95e3957de537a8f4b9d (patch)
tree22f67abf1d527df9d6ef0675628e4d2a4271aaf3 /public/assets/javascripts/ui/site
parentcdcb9ae9c6bb0efd609ec425eb581951a3d4d969 (diff)
parentb1e172be9e8268532610b3e7fe2a4e339eccd1a2 (diff)
merge
Diffstat (limited to 'public/assets/javascripts/ui/site')
-rw-r--r--public/assets/javascripts/ui/site/HomeView.js11
-rw-r--r--public/assets/javascripts/ui/site/ProfileView.js13
-rw-r--r--public/assets/javascripts/ui/site/ProjectList.js28
3 files changed, 40 insertions, 12 deletions
diff --git a/public/assets/javascripts/ui/site/HomeView.js b/public/assets/javascripts/ui/site/HomeView.js
new file mode 100644
index 0000000..02f9ab9
--- /dev/null
+++ b/public/assets/javascripts/ui/site/HomeView.js
@@ -0,0 +1,11 @@
+
+var HomeView = View.extend({
+
+ initialize: function() {
+ },
+
+ load: function() {
+ this.projectList = new ProjectList ()
+ }
+
+})
diff --git a/public/assets/javascripts/ui/site/ProfileView.js b/public/assets/javascripts/ui/site/ProfileView.js
index 8661bcd..f3b35d9 100644
--- a/public/assets/javascripts/ui/site/ProfileView.js
+++ b/public/assets/javascripts/ui/site/ProfileView.js
@@ -11,18 +11,7 @@ var ProfileView = View.extend({
'thirteen'];
$(".bio").addClass(choice(classes));
- $("td.border").each(function() {
- var iframe = $(this).find("iframe").get('0')
- if (! iframe) return
- $(this).on({
- mouseenter: function(e){
- iframe.contentWindow.postMessage("spin-on", window.location.origin)
- },
- mouseleave: function(e){
- iframe.contentWindow.postMessage("spin-off", window.location.origin)
- }
- })
- })
+ this.projectList = new ProjectList ()
}
})
diff --git a/public/assets/javascripts/ui/site/ProjectList.js b/public/assets/javascripts/ui/site/ProjectList.js
new file mode 100644
index 0000000..b72c832
--- /dev/null
+++ b/public/assets/javascripts/ui/site/ProjectList.js
@@ -0,0 +1,28 @@
+
+var ProjectList = View.extend({
+
+ el: "#projectList",
+
+ events: {
+ "mouseenter td.border": 'spinOn',
+ "mouseleave td.border": 'spinOff',
+ },
+
+ initialize: function(){
+console.log("PISS")
+ },
+
+ spinOn: function(e){
+ var iframe = $(e.currentTarget).find("iframe").get('0')
+ if (! iframe) return
+ iframe.contentWindow.postMessage("spin-on", window.location.origin)
+ },
+
+ spinOff: function(e){
+ var iframe = $(e.currentTarget).find("iframe").get('0')
+ if (! iframe) return
+ iframe.contentWindow.postMessage("spin-off", window.location.origin)
+ }
+
+})
+