Skip to content

Commit

Permalink
checkpoint 172/176 tests passing (some missing)
Browse files Browse the repository at this point in the history
  • Loading branch information
collin committed Mar 13, 2012
1 parent 26fd420 commit fe4500a
Show file tree
Hide file tree
Showing 43 changed files with 1,308 additions and 1,648 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -99,7 +99,7 @@ the ShareJS server. Any chanegs you make to the object will be properly applied
In your application initialize function construct your models and views.

```coffee
Todo = AS.Namespace.create("Todo")
Todo = AS.Namespace.new("Todo")
Todo.Application = AS.Application.extend
initialize: ->
@list = Todo.Models.List.open(@params.list_id)
Expand Down
8 changes: 4 additions & 4 deletions lib/alpha_simprini.coffee
Expand Up @@ -4,17 +4,17 @@ Taxi = require "taxi"
require "./alpha_simprini/string"
require "./alpha_simprini/core/logging"

AS = module.exports = Pathology.Namespace.create("AlphaSimprini")
AS = module.exports = Pathology.Namespace.new("AlphaSimprini")

AS.part = (name) ->
exports[name] = require: (libraries) -> AS.require name.toLowerCase(), libraries

# Namespaces
AS.Models = Pathology.Namespace.create()
AS.Views = Pathology.Namespace.create()
AS.Models = Pathology.Namespace.new()
AS.Views = Pathology.Namespace.new()

AS.Object = Pathology.Object
AS.Mixin = Pathology.Mixin
AS.Module = Pathology.Module
AS.Namespace = Pathology.Namespace
AS.Property = Taxi.Property

Expand Down
2 changes: 1 addition & 1 deletion lib/alpha_simprini/client.coffee
Expand Up @@ -3,7 +3,7 @@ Client = AS.part("Client")
_ = require "underscore"

Client.require """
dom view view_events view_model binding binding_group
dom view view_model binding_group binding view_events
views/panel views/region
Expand Down
17 changes: 9 additions & 8 deletions lib/alpha_simprini/client/application.coffee
Expand Up @@ -4,18 +4,20 @@ Taxi = require("taxi")
jwerty = require("jwerty").jwerty
domready = $ = require("jquery")

AS.Application = AS.Object.extend
initialize: () ->
AS.Application = AS.Object.extend ({def, include}) ->
include Taxi.Mixin

def initialize: () ->
@params = AS.params
@god_given_key_handlers()
domready =>
@boot()

@el ?= $("body")

boot: ->
def boot: ->

god_given_key_handlers: ->
def god_given_key_handlers: ->
handlers =
'': 'esc'
'⌘+↩': 'accept'
Expand All @@ -25,11 +27,10 @@ AS.Application = AS.Object.extend
jwerty.key key, (event) =>
@trigger(trigger, event)

view: (constructor, options={}) ->
def view: (constructor, options={}) ->
options.application = this
constructor.create options
constructor.new options

append: (view) ->
def append: (view) ->
@el.append view.el

Taxi.Mixin.extends AS.Application

0 comments on commit fe4500a

Please sign in to comment.