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})"
# }}}
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)"
# }}}