blocked empty topic creation with message to add title
This commit is contained in:
parent
7805871ec2
commit
3bebc62873
1 changed files with 6 additions and 0 deletions
|
@ -701,6 +701,7 @@ Metamaps.Create = {
|
|||
$('#topic_name').focus();
|
||||
});
|
||||
Metamaps.Create.newTopic.beingCreated = true;
|
||||
Metamaps.Create.newTopic.name = "";
|
||||
},
|
||||
hide: function () {
|
||||
$('#new_topic').fadeOut('fast');
|
||||
|
@ -3619,6 +3620,11 @@ Metamaps.Topic = {
|
|||
createTopicLocally: function () {
|
||||
var self = Metamaps.Topic;
|
||||
|
||||
if (Metamaps.Create.newTopic.name === "") {
|
||||
Metamaps.GlobalUI.notifyUser("Please enter a topic title...");
|
||||
return;
|
||||
}
|
||||
|
||||
$(document).trigger(Metamaps.Map.events.editedByActiveMapper);
|
||||
|
||||
var metacode = Metamaps.Metacodes.get(Metamaps.Create.newTopic.metacode);
|
||||
|
|
Loading…
Reference in a new issue