Index: trunk/extensions/Collection/js/collection.js |
— | — | @@ -54,6 +54,8 @@ |
55 | 55 | var script_url = wgServer + |
56 | 56 | ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript); |
57 | 57 | |
| 58 | +var chapter_max_len = 200; |
| 59 | + |
58 | 60 | /******************************************************************************/ |
59 | 61 | |
60 | 62 | function getMWServeStatus() { |
— | — | @@ -101,6 +103,7 @@ |
102 | 104 | function create_chapter() { |
103 | 105 | var name = prompt(gettext('#newChapterText')); |
104 | 106 | if (name) { |
| 107 | + name = name.substring(0, chapter_max_len); |
105 | 108 | req('AddChapter', [name], refresh_list); |
106 | 109 | } |
107 | 110 | return false; |
— | — | @@ -109,6 +112,7 @@ |
110 | 113 | function rename_chapter(index, old_name) { |
111 | 114 | var new_name = prompt(gettext('#renameChapterText'), old_name); |
112 | 115 | if (new_name) { |
| 116 | + new_name = new_name.substring(0, chapter_max_len); |
113 | 117 | req('RenameChapter', [index, new_name], refresh_list); |
114 | 118 | } |
115 | 119 | return false; |