Skip to content

Commit

Permalink
Merge pull request sakaiproject#1240 from clhedrick/LSNBLDR-532a
Browse files Browse the repository at this point in the history
LSNBLDR-532; make sure add column and section show the +
  • Loading branch information
clhedrick committed Nov 2, 2015
2 parents 096f720 + 4d5ce22 commit 3efe087
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lessonbuilder/tool/src/webapp/js/show-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ $(document).ready(function() {
var tail_uls = addAboveLI.parent().nextAll();
var tail_cols = addAboveLI.parent().parent().nextAll();
var section = addAboveLI.parent().parent().parent();
section.after('<div class="section"><div class="column"><div class="editsection"><span class="sectionedit"><h3 class="offscreen">' + msg('simplepage.break-here') + '</h3><a href="/' + newitem + '" title="' + msg('simplepage.join-items') + '" class="section-merge-link" onclick="return false"><span aria-hidden="true" class="fa-compress fa-edit-icon sectioneditfont"></span></a></span><span class="sectionedit sectionedit2"><a href="/lessonbuilder-tool/templates/#" title="' + msg('simplepage.columnopen') + '" class="columnopen"><span aria-hidden="true" class="fa-cog fa-edit-icon sectioneditfont"></span></a></span></div><ul border="0" role="list" style="z-index: 1;" class="indent mainList"><li class="breaksection" role="listitem"></li></ul></div></div>');
section.after('<div class="section"><div class="column"><div class="editsection"><span class="sectionedit"><h3 class="offscreen">' + msg('simplepage.break-here') + '</h3><a href="/' + newitem + '" title="' + msg('simplepage.join-items') + '" class="section-merge-link" onclick="return false"><span aria-hidden="true" class="fa-compress fa-edit-icon sectioneditfont"></span></a></span><span class="sectionedit sectionedit2"><a href="/lessonbuilder-tool/templates/#" title="' + msg('simplepage.columnopen') + '" class="columnopen"><span aria-hidden="true" class="fa-cog fa-edit-icon sectioneditfont"></span></a></span></div><span class="sectionedit addbottom"><a href="#" title="Add new item at bottom of this column" class="add-bottom"><span aria-hidden="true" class="fa-edit-icon plus-edit-icon">+</span></a></span><ul border="0" role="list" style="z-index: 1;" class="indent mainList"><li class="breaksection" role="listitem"></li></ul></div></div>');
// now go to new section
section = section.next();
// and move current item and following into the first col of the new section
Expand All @@ -1972,6 +1972,7 @@ $(document).ready(function() {
// need trigger on the A we just added
section.find('.section-merge-link').click(sectionMergeLink);
section.find('.columnopen').click(columnOpenLink);
section.find('.add-bottom').click(buttonOpenDropdownb);
fixupColAttrs();
fixupHeights();
closeDropdownc();
Expand All @@ -1987,16 +1988,16 @@ $(document).ready(function() {
// current section DIV
var tail_uls = addAboveLI.parent().nextAll();
var column = addAboveLI.parent().parent();
column.after('<div class="column"><div class="editsection"><span class="sectionedit"><h3 class="offscreen">' + msg('simplepage.break-column-here') + '</h3><a href="/' + newitem + '" title="' + msg('simplepage.join-items') + '" class="column-merge-link" onclick="return false"><span aria-hidden="true" class="fa-compress fa-edit-icon sectioneditfont"></span></a></span><span class="sectionedit sectionedit2"><a href="/lessonbuilder-tool/templates/#" title="' + msg('simplepage.columnopen') + '" class="columnopen"><span aria-hidden="true" class="fa-cog fa-edit-icon sectioneditfont"></span></a></span></div><ul border="0" role="list" style="z-index: 1;" class="indent mainList"><li class="breaksection" role="listcolumn"></li></ul></div>');
column.after('<div class="column"><div class="editsection"><span class="sectionedit"><h3 class="offscreen">' + msg('simplepage.break-column-here') + '</h3><a href="/' + newitem + '" title="' + msg('simplepage.join-items') + '" class="column-merge-link" onclick="return false"><span aria-hidden="true" class="fa-compress fa-edit-icon sectioneditfont"></span></a></span><span class="sectionedit sectionedit2"><a href="/lessonbuilder-tool/templates/#" title="' + msg('simplepage.columnopen') + '" class="columnopen"><span aria-hidden="true" class="fa-cog fa-edit-icon sectioneditfont"></span></a></span></div><span class="sectionedit addbottom"><a href="#" title="Add new item at bottom of this column" class="add-bottom"><span aria-hidden="true" class="fa-edit-icon plus-edit-icon">+</span></a></span><ul border="0" role="list" style="z-index: 1;" class="indent mainList"><li class="breaksection" role="listcolumn"></li></ul></div>');
// now go to new section
column = column.next();
// and move current item and following into the first col of the new section
column.find("ul").append(addAboveLI, tail_lis);
column.find(".column").append(tail_uls);

// need trigger on the A we just added
column.find('.column-merge-link').click(columnMergeLink);
column.find('.columnopen').click(columnOpenLink);
column.find('.add-bottom').click(buttonOpenDropdownb);
fixupColAttrs();
fixupHeights();
closeDropdownc();
Expand Down

0 comments on commit 3efe087

Please sign in to comment.