[Pkg-javascript-commits] [backbone] 13/34: removing the embryonic gist demo

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:58:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.2.0
in repository backbone.

commit 9d8b7adf8798c34149bd0260ed0c4fdd6fd4fee1
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Tue Oct 19 15:03:30 2010 -0400

    removing the embryonic gist demo
---
 demos/gist.html | 42 ------------------------------------
 demos/gist.js   | 67 ---------------------------------------------------------
 2 files changed, 109 deletions(-)

diff --git a/demos/gist.html b/demos/gist.html
deleted file mode 100644
index 9fae274..0000000
--- a/demos/gist.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>Backbone Demo: Gist Browser</title>
-    <script src="../test/vendor/underscore-1.1.0.js"></script>
-    <script src="../test/vendor/jquery-1.4.2.js"></script>
-    <script src="../test/vendor/jquery.tmpl.js"></script>
-    <script src="../test/vendor/json2.js"></script>
-    <script src="../backbone.js"></script>
-
-    <style>
-      #gists {
-        margin: 50px;
-        border: 1px solid gray;
-        min-height: 100px;
-      }
-    </style>
-
-    <script id="accountTemplate" type="text/x-jquery-tmpl">
-      <div class="account">
-        <div class="name">${ account.get("name") }</div>
-        <div class="location">${ account.get("location") || "" }</div>
-        <div class="blog">${ account.get("blog") || "" }</div>
-      </div>
-    </script>
-
-    <script src="gist.js"></script>
-  </head>
-  <body>
-
-    <form id="picker">
-      <label for="github_account">Enter a Github Account:</label>
-      <input id="github_account" type="text" value="documentcloud" />
-      <button>Go</button>
-    </form>
-
-    <div id="account_container">
-
-    </div>
-
-  </body>
-</html>
diff --git a/demos/gist.js b/demos/gist.js
deleted file mode 100644
index 532e033..0000000
--- a/demos/gist.js
+++ /dev/null
@@ -1,67 +0,0 @@
-// Backbone Demo: Gist Browser
-// ---------------------------
-
-var GistApp = Backbone.View.extend({
-
-  events : {
-    'submit #picker': 'loadAccount'
-  },
-
-  initialize : function() {
-    this.handleEvents();
-  },
-
-  loadAccount : function() {
-    var name          = this.$("#github_account").val();
-    this.account      = new GithubAccount({username : name});
-    this.accountView  = new AccountView({model: this.account});
-    this.$('#account_container').html(this.accountView.el);
-    return false;
-  }
-
-});
-
-var GithubAccount = Backbone.Model.extend({
-
-  initialize : function() {
-    var me = this;
-    $.ajax({
-      url : me.url(),
-      dataType : "jsonp",
-      success : function (data, status, xhr) {
-        me.set(data.user);
-      }
-    });
-  },
-
-  url : function() {
-    return 'http://gist.github.com/api/v1/json/' + this.get('username');
-  }
-
-});
-
-var AccountView = Backbone.View.extend({
-
-  template : $('#accountTemplate'),
-
-  initialize : function() {
-    _.bindAll(this, 'render');
-    this.model.bind("change", this.render);
-  },
-
-  render : function() {
-    var ui = $('#accountTemplate').tmpl({account : this.model});
-    $(this.el).html(ui);
-  }
-
-});
-
-var GistList = Backbone.View.extend({
-
-  id : 'gists'
-
-});
-
-$(function() {
-  new GistApp({el: document.body});
-});
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list