Merge branch 'master' of less.ly:kraken-ui into dataset-ui
authordsc <dsc@wikimedia.org>
Thu, 12 Apr 2012 22:49:16 +0000 (15:49 -0700)
committerdsc <dsc@wikimedia.org>
Thu, 12 Apr 2012 22:49:16 +0000 (15:49 -0700)
Conflicts:
lib/base.co
lib/graph/graph-model.co

1  2 
lib/graph/graph-model.co
lib/template/graph-display.jade
lib/util/cascade.co

@@@ -281,6 -275,20 +281,19 @@@ Graph = exports.Graph = BaseModel.exten
          path = _.compact [ @urlRoot, slug, action ] .join '/'
          "#path?#{@toKV { keepSlug: !!slug }}"
      
+     /**
+      * @returns {String} Path portion of slug URL, e.g.  /graphs/:slug
+      */
+     toLink: ->
+         "#{@urlRoot}/#{@get('slug')}"
+     
+     /**
+      * @returns {String} Permalinked URI, e.g. http://reportcard.wmflabs.org/:slug
+      */
+     toPermalink: ->
 -        "#{window.location.protocol}//#{window.location.host}#{@toLink()}"
++        "#{root.location.protocol}//#{window.location.host}#{@toLink()}"
++    
+     
 -
 -    toString: -> "#{@ctorName}(id=#{@id}, cid=#{@cid})"
  # }}}
  
  
@@@ -288,14 -296,15 +301,14 @@@ GraphList = exports.GraphList = BaseLis
      urlRoot  : '/graphs'
      model    : Graph
      
--    initialize : ->
--        BaseList::initialize ...
++    constructor : function GraphList then BaseList ...
++    initialize  : -> BaseList::initialize ...
      
      toString: ->
--        modelIds = _.pluck @models, 'id' 
--            .map -> "\"#it\""
++        modelIds = @models
++            .map -> "\"#{it.id ? it.cid}\""
              .join ', '
-         "#{@..name or @..displayName}(#modelIds)"
 -        "#{@ctorName}(#modelIds)"
++        "#{@getClassName()}(#modelIds)"
  # }}}
  
  
Simple merge
Simple merge