Skip to content

Instantly share code, notes, and snippets.

View unamashana's full-sized avatar

Hana Mohan unamashana

View GitHub Profile
This Privacy Policy governs the manner in which hackin.at collects, uses, maintains and discloses information collected from users (each, a "User") of the http://hackin.at website ("Site"). This privacy policy applies to the Site and all products and services offered by hackin.at.
Personal identification information
We may collect personal identification information from Users in a variety of ways, including, but not limited to, when Users visit our site, register on the site, and in connection with other activities, services, features or resources we make available on our Site. Users may be asked for, as appropriate, name, email address. Users may, however, visit our Site anonymously. We will collect personal identification information from Users only if they voluntarily submit such information to us. Users can always refuse to supply personally identification information, except that it may prevent them from engaging in certain Site related activities.
Non-personal identification information
We may coll
SB.Views.CurrentView = Backbone.View.extend(
...
initialize: ->
...
@screens = []
...
set: (view, options) ->
openSearchListing: (query, page) ->
key = "search/#{query}/#{page}"
listing = SB.Utils.getfromCache key, () ->
new SB.Views.Listings.Search query: query, page: page
@currentView.set listing.screenContent
SB.Utils.getfromCache = (key, fn) ->
object = Backbone.CacheStore.get(key)
if !object?
object = fn.apply(this)
Backbone.CacheStore.set(key, object)
object
Backbone.CacheStore = {
get: function(key){
this._store || this.reset();
return this._store[key];
},
set: function(key, object){
this._store || this.reset();
this._store[key] = object;
SB.Views.CurrentView = Backbone.View.extend(
SB.Views.CurrentView = Backbone.View.extend(
initialize: ->
_.bindAll this, "set", "render"
@setElement @options.el
set: (view, options) ->
SB.Views.Main = Backbone.View.extend(
...
startApp: ->
Backbone.history.start({pushState: true, root: "/tickets"});
...
)
SB.Views.Main = Backbone.View.extend(
...
setupRoutes: ->
@router = new SB.Routers.AgentHome
@router.route ":id", "ticket_open", @openTicket
@router.route "labels/:name", "label_open", @openLabelsListing
@router.route "labels/:name/page:page", "label_open_paginated", @openLabelsListing
@router.route /^\/*$/, "open_default_screen", @openDefaultScreen
SB.Views.Main = Backbone.View.extend(
initialize: ->
@setElement($("#wrapper"))
$(@el).html SB.Utils.renderTemplate("main/template")()
@setupRoutes()
@startApp()
)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kickass App</title>
<meta name="description" content="My Kickass App">
<link rel="stylesheet" href="/css/styles.css">