This repository has been archived by the owner on Jan 23, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74ff535
commit 5df0ae9
Showing
3 changed files
with
487 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,37 @@ | ||
<script type="text/javascript"> | ||
var length = $('#issue_template > optgroup > option').length; | ||
if (length < 1) { | ||
$('#template_area').hide(); | ||
<% if is_triggered_by.blank? || (is_triggered_by.present? && is_triggered_by == 'issue_tracker_id') %> | ||
if ($('#issue-form.new_issue').length > 0 && <%= should_replaced %> === true) { | ||
// Uncaught ReferenceError: templateNS is not defined | ||
if (typeof templateNS !== 'undefined') { | ||
templateNS.eraseSubjectAndDescription(); | ||
} | ||
} | ||
<% end %> | ||
} else { | ||
$('#template_area').show(); | ||
var length = $('#issue_template > optgroup > option').length; | ||
if (length < 1) { | ||
$('#template_area').hide(); | ||
<% if is_triggered_by.blank? || (is_triggered_by.present? && is_triggered_by == 'issue_tracker_id') %> | ||
if ($('#issue-form.new_issue').length > 0 && <%= should_replaced %> === true) { | ||
// Uncaught ReferenceError: templateNS is not defined | ||
if (typeof templateNS !== 'undefined') { | ||
templateNS.eraseSubjectAndDescription(); | ||
} | ||
} | ||
<% end %> | ||
} else { | ||
$('#template_area').show(); | ||
} | ||
</script> | ||
<option value="">---</option> | ||
<optgroup label="<%=h @tracker.name %>"> | ||
<%= options_for_template_pulldown(grouped_options) %> | ||
</optgroup> | ||
<% if is_triggered_by.blank? || (is_triggered_by.present? && is_triggered_by == 'issue_tracker_id') %> | ||
<script type="text/javascript"> | ||
let load_url = '<%= url_for(controller: 'issue_templates', action: 'load', project_id: @project) %>'; | ||
let should_replaced = '<%= should_replaced %>'; | ||
let confirm_msg = "<%=h escape_javascript((l(:defaulf_template_loaded, tracker: @tracker))) %>"; | ||
let confirmation = '<%=h l(:label_confirmation) %>'; | ||
let general_text_Yes = '<%=h l(:general_text_Yes) %>'; | ||
let general_text_No = '<%=h l(:general_text_No) %>'; | ||
<script type="text/javascript"> | ||
var templateConfig = { | ||
isTriggeredBy: '<%= is_triggered_by %>', | ||
loadUrl: '<%= url_for(controller: 'issue_templates', action: 'load', project_id: @project) %>', | ||
shouldReplaced: '<%= should_replaced %>', | ||
confirmation: '<%=h l(:label_confirmation) %>', | ||
generalTextYes: '<%=h l(:general_text_Yes) %>', | ||
generalTextNo : '<%=h l(:general_text_No) %>', | ||
} | ||
|
||
var templateNS = templateNS || new ISSUE_TEMPLATE(templateConfig); | ||
|
||
var templateNS = templateNS || new ISSUE_TEMPLATE(); | ||
templateNS.load_template(load_url, confirm_msg, should_replaced, false, confirmation, general_text_Yes, general_text_No); | ||
</script> | ||
templateNS.load_template(); | ||
templateNS.changeTemplatePlace() | ||
</script> | ||
<% end %> |
Oops, something went wrong.