Removes *-main.co files.
authorDavid Schoonover <dsc@wikimedia.org>
Mon, 16 Jul 2012 21:41:47 +0000 (14:41 -0700)
committerDavid Schoonover <dsc@wikimedia.org>
Mon, 16 Jul 2012 22:14:02 +0000 (15:14 -0700)
README.md
src/limn.co
src/main-dashboard.co [deleted file]
src/main-display.co [deleted file]
src/main-edit.co [deleted file]
src/main-graph-list.co [deleted file]
www/dashboard/view.jade
www/graph/edit.jade
www/graph/index.jade
www/graph/view.jade
www/layout.jade

index c7ae1e5..befe80d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -21,7 +21,6 @@ You should now have a server running on 8081.
 - data/graphs/            - saved graph configurations.
 - lib/                    - [Coco][coco] files.  Application logic lives here.
 - lib/{chart,dashboard,dataset,graph}/ - Models and View Classes
-- lib/main-*.co           - These files get included from the main [Jade][jade] views in www/.  They act like client side controllers.  They are responsible for setting up data and rendering views.
 - lib/template/           - client side [Jade][jade] views.  These are included and rendered by View classes.
 - lib/server/             - Server side [Coco][coco] files.  
 - lib/server/server.co    - [Express][expressjs] server setup.   Routing is done here.
index b0c7880..16af2b9 100644 (file)
@@ -57,6 +57,14 @@ LimnApp = limn.LimnApp = Backbone.Router.extend do # {{{
     
     # Helper for setting up models
     processData: (id, data={}) ->
+        ### If we got querystring args, apply them as overrides to the data
+        # loc = String root.location
+        # if loc.split '?' .1
+        #     data = _.uncollapseObject _.fromKV that.replace('#', '%23')
+        #     data.parents = JSON.parse that if data.parents
+        #     data.options = _.synthesize do
+        #         data.options or {}
+        #         (v, k) -> [ k, dyglib.parseOption(k,v) ]
         unless id and _ <[ edit new ]> .contains id
             data.id = data.slug = id
         data
@@ -67,7 +75,7 @@ LimnApp = limn.LimnApp = Backbone.Router.extend do # {{{
     
     
     home: ->
-        console.log "#this.home!"
+        # console.log "#this.home!"
         @showDashboard 'reportcard'
     
     
diff --git a/src/main-dashboard.co b/src/main-dashboard.co
deleted file mode 100644 (file)
index 74d7b3e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Seq      = require 'seq'
-Backbone = require 'backbone'
-
-{ _, op,
-} = require 'limn/util'
-{ AppView, 
-} = require 'limn/app'
-{ BaseView, BaseModel, BaseList,
-} = require 'limn/base'
-{ ChartType, DygraphsChartType,
-} = require 'limn/chart'
-{ Graph, GraphList, GraphDisplayView,
-} = require 'limn/graph'
-{ DashboardView, Dashboard,
-} = require 'limn/dashboard'
-
-
-root = this
-
-
-# Create the Graph Scaffold
-main = ->
-    # Process URL
-    loc = String root.location
-    data = {}
-    if match = /\/dashboards\/([^\/?]+)/i.exec loc
-        id = match[1]
-        data.id = data.slug = id unless _ <[ edit new ]> .contains id
-    
-    # Instantiate model & view
-    root.app = new AppView ->
-        @model  = root.dashboard = new Dashboard data, {+parse}
-        @view   = root.view      = new DashboardView {@model}
-
-
-jQuery main
-
diff --git a/src/main-display.co b/src/main-display.co
deleted file mode 100644 (file)
index b435b62..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-Seq      = require 'seq'
-Backbone = require 'backbone'
-
-{ _, op,
-} = require 'limn/util'
-{ AppView, 
-} = require 'limn/app'
-{ BaseView, BaseModel, BaseList,
-} = require 'limn/base'
-{ ChartType, DygraphsChartType,
-} = require 'limn/chart'
-{ Graph, GraphList, GraphDisplayView,
-} = require 'limn/graph'
-
-
-root = this
-CHART_OPTIONS_SPEC    = []
-CHART_DEFAULT_OPTIONS = {}
-
-
-# Create the Graph Scaffold
-main = ->
-    # Bind to URL changes
-    History.Adapter.bind window, 'statechange', ->
-        # console.log 'StateChange!\n\n', String(root.location), '\n\n'
-    
-    
-    
-    # Process URL
-    loc = String root.location
-    data = {}
-    
-    # If we got querystring args, apply them to the graph
-    # if loc.split '?' .1
-    #     data = _.uncollapseObject _.fromKV that.replace('#', '%23')
-    #     data.parents = JSON.parse that if data.parents
-    #     data.options = _.synthesize do
-    #         data.options or {}
-    #         (v, k) -> [ k, dyglib.parseOption(k,v) ]
-    
-    # Extract id from URL
-    if match = /\/graphs\/([^\/?]+)/i.exec loc
-        id = match[1]
-        data.id = data.slug = id unless _ <[ edit new ]> .contains id
-    
-    # _.dump _.clone(data.options), 'data.options'
-    
-    # Instantiate model & view
-    root.app = new AppView ->
-        @model = root.graph = new Graph data, {+parse}
-        @view  = root.view  = new GraphDisplayView {@model}
-
-jQuery main
diff --git a/src/main-edit.co b/src/main-edit.co
deleted file mode 100644 (file)
index 6c52fac..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-Seq      = require 'seq'
-Backbone = require 'backbone'
-
-{ _, op,
-} = require 'limn/util'
-{ AppView, 
-} = require 'limn/app'
-{ BaseView, BaseModel, BaseList,
-} = require 'limn/base'
-{ ChartType,
-} = require 'limn/chart'
-{ DataSource, DataSourceList,
-} = require 'limn/data'
-{ Graph, GraphList, GraphEditView,
-} = require 'limn/graph'
-
-
-root = this
-CHART_OPTIONS_SPEC    = []
-CHART_DEFAULT_OPTIONS = {}
-
-main = ->
-    # Bind to URL changes
-    History.Adapter.bind window, 'statechange', ->
-        # console.log 'StateChange!\n\n', String(root.location), '\n\n'
-    
-    
-    
-    # Process URL
-    loc = String root.location
-    data = {}
-    
-    # If we got querystring args, apply them to the graph
-    # if loc.split '?' .1
-    #     data = _.uncollapseObject _.fromKV that.replace('#', '%23')
-    #     data.parents = JSON.parse that if data.parents
-    #     data.options = _.synthesize do
-    #         data.options or {}
-    #         (v, k) -> [ k, dyglib.parseOption(k,v) ]
-    
-    # Extract id from URL
-    if match = /\/graphs\/([^\/?]+)/i.exec loc
-        id = match[1]
-        data.id = data.slug = id unless _ <[ edit new ]> .contains id
-    
-    # _.dump _.clone(data.options), 'data.options'
-    
-    # Instantiate app with model & view
-    root.app = new AppView ->
-        @model = root.graph = new Graph data, {+parse}
-        @view  = root.view  = new GraphEditView {@model}
-
-jQuery main
diff --git a/src/main-graph-list.co b/src/main-graph-list.co
deleted file mode 100644 (file)
index af32459..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-{ _, op,
-} = require 'limn/util'
-{ BaseView, BaseModel, BaseList,
-} = require 'limn/base'
-{ Graph, GraphList, GraphListView
-} = require 'limn/graph'
-
-root = do -> this
-
-# instantiates a new GraphListView with the
-# passed in JSON graph_list_data, and then
-# appends the rendered view to the DOM.
-main = (graph_list_data) ->
-    # graphs = root.graphs = new GraphList graph_list_data
-    # view   = root.view   = new GraphListView { 'collection': graphs }
-    view   = root.view   = new GraphListView
-    graphs = root.graphs = view.collection
-    $ '#content .inner' .append view.el
-
-# URL to query for saved graph JSON data.
-# graph_list_url = '/graphs.json'
-# 
-# jQuery.ajax do
-#     url : graph_list_url
-#     dataType : 'json'
-#     success : (res) ->
-#         # result will be the returned JSON
-#         # data of all of the saved graphs
-#         jQuery main.bind this, res
-#     error : (err) -> console.error err
-
-jQuery main
\ No newline at end of file
index 05ff780..81044d9 100644 (file)
@@ -13,7 +13,3 @@ append styles
     mixin css('dashboard.css', media='print')
     
 
-block main-scripts
-    script
-        var limn = require('limn/limn');
-    //- script(src="/js/limn/main-dashboard.js?"+version)
index c525a23..d683291 100644 (file)
@@ -11,7 +11,3 @@ append styles
     mixin css('isotope.css')
 
 
-block main-scripts
-    script
-        var limn = require('limn/limn');
-    //- script(src="/js/limn/main-edit.js?"+version)
index bc02be3..d633c7a 100644 (file)
@@ -3,7 +3,3 @@ extends ../layout
 block title
     title Browse Graphs | Limn
 
-block main-scripts
-    script
-        var limn = require('limn/limn');
-    //- script(src="/js/limn/main-graph-list.js?"+version)
index 49f2ba4..fbdf369 100644 (file)
@@ -6,7 +6,3 @@ block title
 append styles
     mixin css('graph-display.css')
 
-block main-scripts
-    script
-        var limn = require('limn/limn');
-    //- script(src="/js/limn/main-display.js?"+version)
index 9478e86..a307357 100644 (file)
@@ -131,6 +131,8 @@ html(lang="en", dir="ltr")
                             script(src=src+"?"+version)
                     
                     block page-scripts
+                        script
+                            var limn = require('limn/limn');
                     block main-scripts
             
             block addenda