Commit faa91cc1 authored by Rafael Monnerat's avatar Rafael Monnerat

Add slide even if the document is empty (Bug Fix)

parent 13d47738
...@@ -332,7 +332,10 @@ $(document).ready(function(){\n ...@@ -332,7 +332,10 @@ $(document).ready(function(){\n
$(section).append(test);\n $(section).append(test);\n
} \n } \n
slideList.append($(section));\n slideList.append($(section));\n
var i = parseInt($(\'#list > .edit_slide_button\').filter(\':last\').attr(\'id\').split(\'_\')[2]) + 1;\n var i = 0;\n
if ($(\'#list > .edit_slide_button\').length > 0) {\n
var i = parseInt($(\'#list > .edit_slide_button\').filter(\':last\').attr(\'id\').split(\'_\')[2]) + 1;\n
}\n
appendSlideButtons(section, i);\n appendSlideButtons(section, i);\n
$(\'#remove_slide_\' + i).click(function() {removeClick(this);});\n $(\'#remove_slide_\' + i).click(function() {removeClick(this);});\n
$(\'#edit_slide_\' + i).click(function() {editClick(this);});\n $(\'#edit_slide_\' + i).click(function() {editClick(this);});\n
......
59 60
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment