Skip to content

Commit

Permalink
[#1232] Checks if there is no value in slug field ... if there is don…
Browse files Browse the repository at this point in the history
…'t autogenerate the slug for keyup events
  • Loading branch information
johnmartin committed Dec 3, 2013
1 parent 9c34e8b commit c3a3cf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/public/base/javascript/modules/slug-preview.js
Expand Up @@ -9,6 +9,8 @@ this.ckan.module('slug-preview-target', {
el.after(preview);
});

// Make sure there isn't a value in the field already...
if (el.val() == '') {
// Once the preview box is modified stop watching it.
sandbox.subscribe('slug-preview-modified', function () {
el.off('.slug-preview');
Expand All @@ -20,6 +22,7 @@ this.ckan.module('slug-preview-target', {
sandbox.publish('slug-target-changed', this.value);
//slug.val(this.value).trigger('change');
});
}
}
});

Expand Down

0 comments on commit c3a3cf9

Please sign in to comment.