Initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<%= content_tag :div, class: "modal modal-right", id: "edit_unreleased_appearance_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalLabel">Update Unreleased Appearance</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<%= bootstrap_form_with model: unreleased_appearance, url: [unreleased_appearance, {video_id: unreleased_appearance.video}], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
|
||||
<div class="modal-body">
|
||||
|
||||
<%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "unreleased_appearance" %>
|
||||
|
||||
<div id="unreleased_appearance_fields">
|
||||
<%= form.hidden_field :time_elapsed, value: unreleased_appearance.time_elapsed %>
|
||||
<%= form.static_control nil, name: nil, label: "Video Timecode", value: unreleased_appearance.appears_at %>
|
||||
<%= form.text_field :channel %>
|
||||
<%= form.text_field :timecode_in %>
|
||||
<%= form.text_field :timecode_out %>
|
||||
<%= form.text_field :duration %>
|
||||
<%= form.text_field :source_file_name %>
|
||||
<%= form.text_field :clip_name %>
|
||||
<%= form.text_field :description %>
|
||||
<%= form.select :note_category, options_for_note_category_select(unreleased_appearance), label: "Note" %>
|
||||
<%= form.text_area :notes, control_col: "col-12", hide_label: true, placeholder: true, rows: 4 %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
|
||||
<%= form.submit class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,36 @@
|
||||
<%= content_tag :div, class: "modal modal-right", id: "new_unreleased_appearance_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalLabel">New Unreleased Appearance</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<%= bootstrap_form_with model: [unreleased_appearance.video, "video_analyses", unreleased_appearance], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
|
||||
<div class="modal-body">
|
||||
|
||||
<%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "unreleased_appearance" %>
|
||||
|
||||
<div id="unreleased_appearance_fields">
|
||||
<%= form.hidden_field :time_elapsed, value: unreleased_appearance.time_elapsed %>
|
||||
<%= form.static_control nil, name: nil, label: "Video Timecode", value: unreleased_appearance.appears_at %>
|
||||
<%= form.text_field :channel %>
|
||||
<%= form.text_field :timecode_in %>
|
||||
<%= form.text_field :timecode_out %>
|
||||
<%= form.text_field :duration %>
|
||||
<%= form.text_field :source_file_name %>
|
||||
<%= form.text_field :clip_name %>
|
||||
<%= form.text_field :description %>
|
||||
<%= form.select :note_category, options_for_note_category_select(unreleased_appearance), label: "Note" %>
|
||||
<%= form.text_area :notes, control_col: "col-12", hide_label: true, placeholder: true, rows: 4 %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
|
||||
<%= form.submit class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,4 @@
|
||||
$("#issues_and_concerns_list").html("<%= j render("video_analyses/unreleased_appearances", unreleased_appearances: @unreleased_appearances_data.unreleased_appearances) %>");
|
||||
|
||||
<% # Close the modal %>
|
||||
$("#new_unreleased_appearance_modal").modal("toggle");
|
||||
@@ -0,0 +1 @@
|
||||
$("#issues_and_concerns_list").html("<%= j render("video_analyses/unreleased_appearances", unreleased_appearances: @unreleased_appearances_data.unreleased_appearances) %>");
|
||||
11
app/views/video_analyses/unreleased_appearances/edit.js.erb
Normal file
11
app/views/video_analyses/unreleased_appearances/edit.js.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<% # Remove the modal if it already exists %>
|
||||
<% # Remove modals if it already exists %>
|
||||
$("#new_unreleased_appearance_modal").remove();
|
||||
$("#edit_unreleased_appearance_modal").remove();
|
||||
|
||||
<% # Create and show the modal %>
|
||||
$("body").append("<%= j render('edit_unreleased_appearance_modal', unreleased_appearance: @unreleased_appearance) %>");
|
||||
$("#edit_unreleased_appearance_modal").modal("toggle");
|
||||
|
||||
handleNotesFieldVisibility();
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
$("[data-toggle=tooltip]").tooltip("dispose");
|
||||
<% # Remove modals if it already exists %>
|
||||
$("#new_unreleased_appearance_modal").remove();
|
||||
$("#edit_unreleased_appearance_modal").remove();
|
||||
|
||||
<% # Create and show the modal %>
|
||||
$("body").append("<%= j render('new_unreleased_appearance_modal', unreleased_appearance: @unreleased_appearance) %>");
|
||||
$("#new_unreleased_appearance_modal").modal("toggle");
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
$("#issues_and_concerns_list").html("<%= j render("video_analyses/unreleased_appearances", unreleased_appearances: @unreleased_appearances_data.unreleased_appearances) %>");
|
||||
|
||||
<% # Close the modal %>
|
||||
$("#edit_unreleased_appearance_modal").modal("toggle");
|
||||
Reference in New Issue
Block a user