Skip to content

Commit

Permalink
update widgets section style to to remove thickbox dependecy
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jan 3, 2024
1 parent 9b5dd85 commit 9653406
Show file tree
Hide file tree
Showing 7 changed files with 217 additions and 695 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
// Other
//= require jquery.blockUI
//= require facebox
//= require thickbox
//= require jquery.dataTables
//= require chosen.jquery
//= require autocomplete
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/application.css.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*= require facebox
*= require jquery-ui-1.8.1.custom
*= require jquery.autocomplete
*= require thickbox
*= require trumbowyg
*= require flag-icon
*= require theme-variables
Expand Down
13 changes: 13 additions & 0 deletions app/components/widget_block_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class WidgetBlockComponent < ViewComponent::Base

renders_one :help_text
renders_one :widget

def initialize(id: , title: , description:)
@id = id
@title = title
@description = description
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
%div.d-flex{data: {turbo: false}}
%div.w-50.mr-3
%div
%div.card-body
%h5.card-title
= @title
%p.card-text
= @description

%div.w-100.d-flex.justify-content-center
%div.card.py-3.px-2{style: "width: 600px"}
= render TabsContainerComponent.new(id: @id) do |t|
- t.item(title: 'Widget', selected: true)
- t.item(title: '') do
%span.mx-1
See code
= inline_svg_tag('json.svg')

- t.item_content do
%div.py-3.d-flex.justify-content-center
= widget
- t.item_content do
= help_text

%hr.divider.w-100

389 changes: 178 additions & 211 deletions app/views/ontologies/sections/_widgets.html.haml

Large diffs are not rendered by default.

319 changes: 0 additions & 319 deletions vendor/assets/javascripts/thickbox.js.erb

This file was deleted.

Loading

0 comments on commit 9653406

Please sign in to comment.