소스 검색

Frontend - tech documentation (wip)

Vijayakrishnan 4 년 전
부모
커밋
163923989f
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      spec/front-end-documentation.md

+ 17 - 0
spec/front-end-documentation.md

@@ -107,9 +107,26 @@ Writing start up code for a page. Example:
 
 > Defined in mc-init.js & mc.js
 
+---
+## Stag Popups
+
+Medium to big popups (different from moes). Identified via the `[stag-popup-key]` attribute and displayed using the `showStagPopup(_key)` method call.
+
+```html
+<div class="stag-popup stag-popup-md" stag-popup-key="my-popup">
+   popup content
+</div>
+```
+```javascript
+showStagPopup('my-popup')
+```
 
+Stag popup maintains an app-level popup stack. You can have a popup over a popup over a popup. Clicking anywhere outside or hitting ESC will close the topmost stag-popup and so on. Stag popups can also have regular moes within their content.
 
+If a stag-popup has the attribute `[close-all-with-self]` - then all stag-popups are closed along with it (regardless of the number of stacked popups currently open)
 
+Stag popups with `.stag-slide` class will slide in from the right (instead of appearing at the center).
 
+> Defined in stag-popup.js
 
 Yemi mods Shortcuts Stag-popup Note > templates Pro-suggest, Pharmacy suggest Popupmode queryline param