1/** 2 * Turboã使ç¨ãããã¤ã¢ãã°è¡¨ç¤ºã®ããã®Stimulusã³ã³ããã¼ã©ã¼ 3 * 4 * ä½¿ãæ¹: 5 * 1. ãã¤ã¢ãã°ã表示ãããè¦ç´ ã« turbo_frame_tag ã使ç¨ãã以ä¸ã®å±æ§ãè¨å®: 6 * = turbo_frame_tag 'dialog-id', class: 'full-dialog', 7 * data: { controller: 'turbo-dialog', 8 * action: 'turbo:frame-render->turbo-dialog#open' } 9 * 10 * 2. ãªã³ã¯ããã¿ã³ãããã¤ã¢ãã°ãéãå ´å: 11 * = link_to path, data: { turbo: true, turbo_frame: 'dialog-id' } 12 * 13 * 3. å¼ã³åºãããå´ã®Viewãã¡ã¤ã«ã®æ§é : 14 * = turbo_frame_tag 'dialog-id' do 15 * .dialog-add-target 16 * .full-dialog-body 17 * = render 'shared/header' 18 * ï¼ãã¤ã¢ãã°ã®å å®¹ï¼ 19 * 20 * 注æ: 21 * - ãã¤ã¢ãã°ã®IDã¯ä¸æã§ããå¿ è¦ãããã¾ã 22 * - full-dialog 㨠dialog-add-target 㨠full-dialog-body ã¯ã©ã¹ã¯å¿ é ã§ã 23 * - shared/header ã®èªã¿è¾¼ã¿ã¯å¿ é ã§ãï¼éãããã¿ã³ãªã©ã®ãã¤ã¢ãã°å¶å¾¡ã«å¿ è¦ï¼ 24 */ 25import { Controller } from "@hotwired/stimulus" 26 27export default class extends Controller { 28 connect() { 29 document.getElementById('loading-splash').style.display = 'none'; 30 } 31 32 open(event) { 33 if (event.target !== event.currentTarget) return; 34 35 $('#loading-splash').hide(); 36 if (!dialog.isTargetOpened(`#${this.element.id}`)) { 37 dialog.open(`#${this.element.id}`) 38 } 39 } 40};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.