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 d28965ad..7989fed2 100644 --- a/app/assets/javascripts/src/Metamaps.js +++ b/app/assets/javascripts/src/Metamaps.js @@ -820,15 +820,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 @@ -3246,6 +3246,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 }); @@ -3382,6 +3384,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 = []; @@ -3450,6 +3454,9 @@ Metamaps.Synapse = { * */ Metamaps.Map = { + events: { + editedByActiveMapper: "Metamaps:Map:events:editedByActiveMapper" + }, init: function () { var self = Metamaps.Map; @@ -3466,6 +3473,8 @@ Metamaps.Map = { self.InfoBox.init(); self.CheatSheet.init(); + + $(document).on(Metamaps.Map.events.editedByActiveMapper, self.editedByActiveMapper); }, launch: function (id) { var bb = Metamaps.Backbone; @@ -3551,6 +3560,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); + } } }; @@ -3597,9 +3611,8 @@ Metamaps.Map.InfoBox = { changing: false, selectingPermission: false, changePermissionText: "