mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-01 02:05:41 +08:00
remove task description info from canvas task card [fixes SCI-2187]
This commit is contained in:
parent
1e4a975304
commit
3a4df069d7
3 changed files with 0 additions and 66 deletions
|
@ -327,7 +327,6 @@ function destroyFullZoom() {
|
|||
$(".module-large .buttons-container [role=tab]").off("ajax:before ajax:success ajax:error");
|
||||
$("div.module-large").off("mouseenter mouseleave");
|
||||
$("div.module-large a.due-date-link").off("ajax:success ajax:error");
|
||||
$("#manage-module-description-modal [data-action='submit']").off("click");
|
||||
$("#manage-module-due-date-modal [data-action='submit']").off("click");
|
||||
$("div.module-large a.edit-tags-link").off("ajax:before ajax:success");
|
||||
$("li[data-module-group]").off("mouseenter mouseleave");
|
||||
|
@ -593,46 +592,6 @@ function bindWindowResizeEvent() {
|
|||
function bindFullZoomAjaxTabs() {
|
||||
var manageUsersModal = null;
|
||||
var manageUsersModalBody = null;
|
||||
var editDescriptionModal = null;
|
||||
var editDescriptionModalBody = null;
|
||||
|
||||
// Initialize edit description modal window
|
||||
function initEditDescription($el) {
|
||||
$el.find(".description-link")
|
||||
.on("ajax:success", function(ev, data, status) {
|
||||
var descriptionLink = $(this);
|
||||
var descriptionTab = descriptionLink.closest(".tab-pane");
|
||||
|
||||
// Set modal body & title
|
||||
editDescriptionModalBody.html(data.html);
|
||||
editDescriptionModal
|
||||
.find("#manage-module-description-modal-label")
|
||||
.text(data.title);
|
||||
|
||||
editDescriptionModalBody.find("form")
|
||||
.on("ajax:success", function(ev2, data2, status2) {
|
||||
// Update module's description in the tab
|
||||
descriptionTab.find(".description-label")
|
||||
.html(data2.description_label);
|
||||
|
||||
// Close modal
|
||||
editDescriptionModal.modal("hide");
|
||||
})
|
||||
.on("ajax:error", function(ev2, data2, status2) {
|
||||
// Display errors if needed
|
||||
$(this).renderFormErrors("my_module", data2.responseJSON);
|
||||
});
|
||||
|
||||
// Disable canvas dragging events
|
||||
toggleCanvasEvents(false);
|
||||
|
||||
// Show modal
|
||||
editDescriptionModal.modal("show");
|
||||
})
|
||||
.on("ajax:error", function(ev, data, status) {
|
||||
// TODO
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize users editing modal remote loading.
|
||||
function initUsersEditLink($el) {
|
||||
|
@ -676,8 +635,6 @@ function bindFullZoomAjaxTabs() {
|
|||
|
||||
manageUsersModal = $("#manage-module-users-modal");
|
||||
manageUsersModalBody = manageUsersModal.find(".modal-body");
|
||||
editDescriptionModal = $("#manage-module-description-modal");
|
||||
editDescriptionModalBody = editDescriptionModal.find(".modal-body");
|
||||
|
||||
// Reload users tab HTML element when modal is closed
|
||||
manageUsersModal.on("hide.bs.modal", function () {
|
||||
|
@ -705,21 +662,6 @@ function bindFullZoomAjaxTabs() {
|
|||
manageUsersModalBody.html("");
|
||||
});
|
||||
|
||||
// When clicking on description modal "Update" button,
|
||||
// submit its inner-lying form
|
||||
editDescriptionModal.find("[data-action='submit']").click(function() {
|
||||
editDescriptionModalBody.find("form").submit();
|
||||
});
|
||||
|
||||
// Remove description modal content when window is closed
|
||||
editDescriptionModal.on("hidden.bs.modal", function() {
|
||||
$(this).find("form").off("ajax:success ajax:error");
|
||||
editDescriptionModalBody.html("");
|
||||
|
||||
// Re-activate canvas dragging events
|
||||
toggleCanvasEvents(true);
|
||||
});
|
||||
|
||||
// initialize my_module tab remote loading
|
||||
var elements = $(".module-large .buttons-container [role=tab]");
|
||||
elements.on("ajax:before", function (e) {
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Edit description modal -->
|
||||
<%= render partial: "my_modules/modals/manage_description_modal" %>
|
||||
|
||||
<!-- Edit due date modal -->
|
||||
<%= render partial: "my_modules/modals/manage_due_date_modal" %>
|
||||
|
||||
|
|
|
@ -41,11 +41,6 @@
|
|||
<div class="panel-footer panel-footer-scinote buttons-container">
|
||||
<ul class="nav nav-tabs nav-tabs-less" role="tablist">
|
||||
<% if can_read_experiment?(my_module.experiment) %>
|
||||
<li role="presentation">
|
||||
<a class="btn btn-link task-card-view-info" href="<%= my_module_url(id: my_module.id, format: :json) %>" aria-controls="<%= my_module.id %>_info" role="tab" data-remote="true">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a class="btn btn-link task-card-view-users" href="<%= my_module_user_my_modules_url(my_module_id: my_module.id, format: :json) %>" aria-controls="<%= my_module.id %>_users" role="tab" data-remote="true">
|
||||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
|
||||
|
|
Loading…
Reference in a new issue