Commits

Udi Bauman committed c9701b6

updating story image content

Comments (0)

Files changed (2)

static/js/mylibs/maps-rendering.js

         story_title_nodes[story.id].data = story.get('title');
     }
 
+    function change_story_image(story) {
+//        console.log(story_content_image[story.get('id')]);//.setAttribute("src", story.get('image_url'));
+        story_content_image[story.get('id')].setAttribute("src", story.get('image_url'));
+    }
+
     function change_story_content(story) {
 //        story_content_nodes[story.id].data = story.get('content');
         var font_size = (story_content_image[story.get('id')]) ? 1 : 2;
         delete_story: delete_story,
         rename_story: rename_story,
         change_story_content: change_story_content,
+        change_story_image: change_story_image,
         change_story_approval: change_story_approval,
         change_story_schedule_date: change_story_schedule_date,
         load_answers: load_answers,

static/svg/map-template.svg

Old
Old image
New
New image
         top.stories.bind('add',                 top.renderer.create_story,              top.renderer);
         top.stories.bind('remove',              top.renderer.delete_story,              top.renderer);
         top.stories.bind('change:title',        top.renderer.rename_story,              top.renderer);
+        top.stories.bind('change:image_url',    top.renderer.change_story_image,        top.renderer);
         top.stories.bind('change:content',      top.renderer.change_story_content,      top.renderer);
         top.stories.bind('change:is_approved',  top.renderer.change_story_approval,     top.renderer);
         top.stories.bind('change:schedule_date',top.renderer.change_story_schedule_date,top.renderer);