Skip to content

Commit

Permalink
remove label-ajax stimulus code
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Nov 1, 2024
1 parent 8d5f1b5 commit 100170f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 105 deletions.
19 changes: 0 additions & 19 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def get_apikey
end
end


def omniauth_providers_info
$OMNIAUTH_PROVIDERS
end
Expand All @@ -76,7 +75,6 @@ def current_user_admin?
session[:user] && session[:user].admin?
end


def child_id(child)
child.id.to_s.split('/').last
end
Expand Down Expand Up @@ -155,7 +153,6 @@ def add_proposal_button(parent_id, parent_type)
end
end


def subscribe_button(ontology_id)
return if ontology_id.nil?
render TurboFrameComponent.new(id: 'subscribe_button', src: ontology_subscriptions_path(ontology_id: ontology_id.split('/').last), class: 'ml-1') do |t|
Expand Down Expand Up @@ -226,21 +223,6 @@ def notification_type(flash_key)
bootstrap_alert_class[flash_key]
end

def label_ajax_data_h(cls_id, ont_acronym, ajax_uri, cls_url)
{ data:
{
'label-ajax-cls-id-value': cls_id,
'label-ajax-ontology-acronym-value': ont_acronym,
'label-ajax-ajax-url-value': ajax_uri,
'label-ajax-cls-id-url-value': cls_url
}
}
end

def label_ajax_data(cls_id, ont_acronym, ajax_uri, cls_url)
label_ajax_data_h(cls_id, ont_acronym, ajax_uri, cls_url)
end

def label_ajax_link(id, ont_acronym, ajax_uri, target)
ajax_uri = if ajax_uri.include?('?')
"#{ajax_uri}&ontology=#{ont_acronym}&id=#{escape(id)}"
Expand All @@ -253,7 +235,6 @@ def label_ajax_link(id, ont_acronym, ajax_uri, target)
end
end


def get_link_for_cls_ajax(cls_id, ont_acronym, target = nil)
if cls_id.start_with?('http://') || cls_id.start_with?('https://')
ajax_url = '/ajax/classes/label'
Expand Down
3 changes: 0 additions & 3 deletions app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ application.register("form-options-display", FormDisplayController)
import HistoryController from "./history_controller"
application.register("history", HistoryController)

import LabelAjaxController from "./label_ajax_controller"
application.register("label-ajax", LabelAjaxController)

import LanguageChangeController from "./language_change_controller"
application.register("language-change", LanguageChangeController)

Expand Down
83 changes: 0 additions & 83 deletions app/javascript/controllers/label_ajax_controller.js

This file was deleted.

0 comments on commit 100170f

Please sign in to comment.