0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Tweaking slug logic in post settings.

Closes #2136.
- sets slug to placeholder text if slug is blank
This commit is contained in:
Garrett Murphey 2014-02-07 20:01:19 -05:00
parent 0dc0a9bb7c
commit 89aa7c6f81

View file

@ -99,7 +99,10 @@
var self = this,
slug = self.model.get('slug'),
slugEl = e.currentTarget,
newSlug = slugEl.value;
newSlug = slugEl.value,
placeholder = slugEl.placeholder;
newSlug = (_.isEmpty(newSlug) && placeholder) ? placeholder : newSlug;
// If the model doesn't currently
// exist on the server (aka has no id)