|
123 | 123 | $('#custom').attr('hidden', true); |
124 | 124 | $('#{{componentId}}-{{sectionId}}-custom-version').val(''); |
125 | 125 |
|
126 | | - if (bump === 'buildMeta') { |
127 | | - $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(''); |
128 | | - $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(''); |
129 | | - $('#{{componentId}}-{{sectionId}}-build-meta-prefix').attr('disabled', false); |
130 | | - $('#{{componentId}}-{{sectionId}}-pre-release-prefix').attr('disabled', true); |
131 | | - $('#{{componentId}}-{{sectionId}}-force-mark-prerelease').attr('disabled', true); |
132 | | - $('#{{componentId}}-{{sectionId}}-force-mark-prerelease')[0].checked = true; |
133 | | - } else if (bump === 'preRelease') { |
| 126 | + if (bump === 'preRelease' || |
| 127 | + bump === 'major_preRelease' || |
| 128 | + bump === 'minor_preRelease' || |
| 129 | + bump === 'patch_preRelease' |
| 130 | + ) { |
134 | 131 | $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(''); |
135 | 132 | $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(''); |
136 | 133 | $('#{{componentId}}-{{sectionId}}-pre-release-prefix').attr('disabled', false); |
137 | 134 | $('#{{componentId}}-{{sectionId}}-build-meta-prefix').attr('disabled', true); |
138 | 135 | $('#{{componentId}}-{{sectionId}}-force-mark-prerelease').attr('disabled', true); |
139 | 136 | $('#{{componentId}}-{{sectionId}}-force-mark-prerelease')[0].checked = true; |
140 | | - } else if (bump === 'preReleaseBuildMeta') { |
| 137 | + } else if (bump === 'buildMeta' || |
| 138 | + bump === 'major_buildMeta' || |
| 139 | + bump === 'minor_buildMeta' || |
| 140 | + bump === 'patch_buildMeta' |
| 141 | + ) { |
| 142 | + $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(''); |
| 143 | + $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(''); |
| 144 | + $('#{{componentId}}-{{sectionId}}-build-meta-prefix').attr('disabled', false); |
| 145 | + $('#{{componentId}}-{{sectionId}}-pre-release-prefix').attr('disabled', true); |
| 146 | + $('#{{componentId}}-{{sectionId}}-force-mark-prerelease').attr('disabled', true); |
| 147 | + $('#{{componentId}}-{{sectionId}}-force-mark-prerelease')[0].checked = true; |
| 148 | + } else if (bump === 'preReleaseBuildMeta' || |
| 149 | + bump === 'major_preReleaseBuildMeta' || |
| 150 | + bump === 'minor_preReleaseBuildMeta' || |
| 151 | + bump === 'patch_preReleaseBuildMeta' |
| 152 | + ) { |
141 | 153 | $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(''); |
142 | 154 | $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(''); |
143 | 155 | $('#{{componentId}}-{{sectionId}}-pre-release-prefix').attr('disabled', false); |
|
172 | 184 | postData['force-mark-prerelease'] = $('#{{componentId}}-{{sectionId}}-force-mark-prerelease')[0].checked; |
173 | 185 | postData['bump'] = bump; |
174 | 186 |
|
175 | | - if (bump === 'preRelease') { |
| 187 | + if (bump === 'preRelease' || |
| 188 | + bump === 'major_preRelease' || |
| 189 | + bump === 'minor_preRelease' || |
| 190 | + bump === 'patch_preRelease' |
| 191 | + ) { |
176 | 192 | postData['preReleasePrefix'] = $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(); |
177 | 193 | if (postData['preReleasePrefix'] === '') { |
178 | 194 | PNotify.error({'text': 'Provide pre-release prefix.'}); |
179 | 195 | return; |
180 | 196 | } |
181 | | - } else if (bump === 'buildMeta') { |
| 197 | + } else if (bump === 'buildMeta' || |
| 198 | + bump === 'major_buildMeta' || |
| 199 | + bump === 'minor_buildMeta' || |
| 200 | + bump === 'patch_buildMeta' |
| 201 | + ) { |
182 | 202 | postData['buildMetaPrefix'] = $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(); |
183 | 203 | if (postData['buildMetaPrefix'] === '') { |
184 | 204 | PNotify.error({'text': 'Provide build meta prefix.'}); |
185 | 205 | return; |
186 | 206 | } |
187 | | - } else if (bump === 'preReleaseBuildMeta') { |
| 207 | + } else if (bump === 'preReleaseBuildMeta' || |
| 208 | + bump === 'major_preReleaseBuildMeta' || |
| 209 | + bump === 'minor_preReleaseBuildMeta' || |
| 210 | + bump === 'patch_preReleaseBuildMeta' |
| 211 | + ) { |
188 | 212 | postData['preReleasePrefix'] = $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(); |
189 | 213 | postData['buildMetaPrefix'] = $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(); |
190 | 214 | if (postData['preReleasePrefix'] === '') { |
|
301 | 325 | $('#{{componentId}}-{{sectionId}}').BazContentSectionWithForm({'task':'validateForm'}); |
302 | 326 |
|
303 | 327 | if ($('#{{componentId}}-{{sectionId}}-alert').length === 0) { |
304 | | - $('#generate').attr('disabled', true); |
305 | | - $('#generate').children('i').removeClass('fa-wand-sparkles').addClass('fa-spin fa-cog'); |
| 328 | + // $('#generate').attr('disabled', true); |
| 329 | + // $('#generate').children('i').removeClass('fa-wand-sparkles').addClass('fa-spin fa-cog'); |
306 | 330 |
|
307 | 331 | var postData = { }; |
308 | 332 | postData['bump'] = $('#{{componentId}}-{{sectionId}}-release-type').val(); |
309 | | - if (postData['bump'] === 'preRelease') { |
| 333 | + if (postData['bump'] === 'preRelease' || |
| 334 | + postData['bump'] === 'major_preRelease' || |
| 335 | + postData['bump'] === 'minor_preRelease' || |
| 336 | + postData['bump'] === 'patch_preRelease' |
| 337 | + ) { |
310 | 338 | postData['preReleasePrefix'] = $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(); |
311 | 339 | if (postData['preReleasePrefix'] === '') { |
312 | 340 | PNotify.error({'text': 'Provide pre-release prefix.'}); |
313 | 341 | return; |
314 | 342 | } |
315 | | - } else if (postData['bump'] === 'buildMeta') { |
| 343 | + } else if (postData['bump'] === 'buildMeta' || |
| 344 | + postData['bump'] === 'major_buildMeta' || |
| 345 | + postData['bump'] === 'minor_buildMeta' || |
| 346 | + postData['bump'] === 'patch_buildMeta' |
| 347 | + ) { |
316 | 348 | postData['buildMetaPrefix'] = $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(); |
317 | 349 | if (postData['buildMetaPrefix'] === '') { |
318 | 350 | PNotify.error({'text': 'Provide build meta prefix.'}); |
319 | 351 | return; |
320 | 352 | } |
321 | | - } else if (postData['bump'] === 'preReleaseBuildMeta') { |
| 353 | + } else if (postData['bump'] === 'preReleaseBuildMeta' || |
| 354 | + postData['bump'] === 'major_preReleaseBuildMeta' || |
| 355 | + postData['bump'] === 'minor_preReleaseBuildMeta' || |
| 356 | + postData['bump'] === 'patch_preReleaseBuildMeta' |
| 357 | + ) { |
322 | 358 | postData['preReleasePrefix'] = $('#{{componentId}}-{{sectionId}}-pre-release-prefix').val(); |
323 | 359 | postData['buildMetaPrefix'] = $('#{{componentId}}-{{sectionId}}-build-meta-prefix').val(); |
324 | 360 | if (postData['preReleasePrefix'] === '') { |
|
1223 | 1259 | $('#repo-details').attr('hidden', false); |
1224 | 1260 | $('#module-details').attr('hidden', true); |
1225 | 1261 | $('.addData').attr('hidden', true); |
| 1262 | + $('.updateData').attr('hidden', true); |
1226 | 1263 | $('.cancelForm').attr('hidden', true); |
1227 | 1264 | $('.closeForm').attr('hidden', false); |
1228 | 1265 |
|
|
0 commit comments