diff --git a/app/assets/images/delete_mapinfo.png b/app/assets/images/delete_mapinfo.png new file mode 100644 index 00000000..e6316c2e Binary files /dev/null and b/app/assets/images/delete_mapinfo.png differ diff --git a/app/assets/images/share_sprite_mapinfo.png b/app/assets/images/share_sprite_mapinfo.png new file mode 100644 index 00000000..ebe96f41 Binary files /dev/null and b/app/assets/images/share_sprite_mapinfo.png differ diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js index 2f3cf2f9..41765a3f 100644 --- a/app/assets/javascripts/src/Metamaps.js +++ b/app/assets/javascripts/src/Metamaps.js @@ -821,15 +821,15 @@ Metamaps.TopicCard = { $el.attr('maxlength', '140'); - $('.showcard .title').append('
'); + $('.showcard .title').append(''); var callback = function (data) { - $('.titleCounter').html(data.all + '/140'); + $('.nameCounter.forTopic').html(data.all + '/140'); }; Countable.live(el, callback); }); bipName.bind("best_in_place:deactivate", function () { - $('.titleCounter').remove(); + $('.nameCounter.forTopic').remove(); }); //bind best_in_place ajax callbacks @@ -3247,6 +3247,8 @@ Metamaps.Topic = { createTopicLocally: function () { var self = Metamaps.Topic; + $(document).trigger(Metamaps.Map.events.editedByActiveMapper); + var metacode = Metamaps.Metacodes.findWhere({ name: Metamaps.Create.newTopic.metacode }); @@ -3383,6 +3385,8 @@ Metamaps.Synapse = { synapse, mapping; + $(document).trigger(Metamaps.Map.events.editedByActiveMapper); + //for each node in this array we will create a synapse going to the position2 node. var synapsesToCreate = []; @@ -3451,6 +3455,9 @@ Metamaps.Synapse = { * */ Metamaps.Map = { + events: { + editedByActiveMapper: "Metamaps:Map:events:editedByActiveMapper" + }, init: function () { var self = Metamaps.Map; @@ -3467,6 +3474,8 @@ Metamaps.Map = { self.InfoBox.init(); self.CheatSheet.init(); + + $(document).on(Metamaps.Map.events.editedByActiveMapper, self.editedByActiveMapper); }, launch: function (id) { var bb = Metamaps.Backbone; @@ -3552,6 +3561,11 @@ Metamaps.Map = { Metamaps.GlobalUI.CreateMap.topicsToMap = nodes_data; Metamaps.GlobalUI.CreateMap.synapsesToMap = synapses_data; + }, + editedByActiveMapper: function () { + if (Metamaps.Active.Mapper) { + Metamaps.Mappers.add(Metamaps.Active.Mapper); + } } }; @@ -3598,9 +3612,8 @@ Metamaps.Map.InfoBox = { changing: false, selectingPermission: false, changePermissionText: "