Skip to content

Commit fb6aab9

Browse files
line 100
1 parent f556148 commit fb6aab9

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

3-frames-and-windows/01-popup-windows/article.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,22 @@ params
5454
تنظیمات برای `params`:
5555

5656
- Position:
57-
- `left/top` (numeric) -- coordinates of the window top-left corner on the screen. There is a limitation: a new window cannot be positioned offscreen.
58-
- `width/height` (numeric) -- width and height of a new window. There is a limit on minimal width/height, so it's impossible to create an invisible window.
59-
- Window features:
60-
- `menubar` (yes/no) -- shows or hides the browser menu on the new window.
61-
- `toolbar` (yes/no) -- shows or hides the browser navigation bar (back, forward, reload etc) on the new window.
62-
- `location` (yes/no) -- shows or hides the URL field in the new window. FF and IE don't allow to hide it by default.
63-
- `status` (yes/no) -- shows or hides the status bar. Again, most browsers force it to show.
64-
- `resizable` (yes/no) -- allows to disable the resize for the new window. Not recommended.
65-
- `scrollbars` (yes/no) -- allows to disable the scrollbars for the new window. Not recommended.
57+
- `چپ/بالا`(عددی) - مختصات گوشه‌ی سمت چپ بالای پنجره در صفحه. یک محدودیت وجود دارد: یک پنجره‌ی جدید را نمی‌توان خارج صفحه قرار داد.
58+
- `عرض/ارتفاع`(عددی) - عرض و ارتفاع یک پنجره‌ی جدید. در حداقل عرض/ارتفاع یک محدودیت وجود دارد. بنابرین غیرممکن است که یک پنجره‌ی غیرقابل دیدن ایجاد کرد.
59+
- ویژگی‌های پنجره:
60+
- `menubar` (بله/خیر) -- .منوی مرورگر را در پنجره جدید نشان می‌دهد یا پنهان می‌کند
61+
- `toolbar` (بله/خیر) -- .نوار پیمایش مرورگر (به عقب، جلو، بارگذاری مجدد و ...) را در پنجره جدید نشان می‌دهد یا پنهان می‌کند
62+
- `location` (بله/خیر) -- .به طور پیش فرض اجازه مخفی کردن آن را نمی‌دهند IE و FF را در پنجره‌ی جدید نشان می‌دهد یا پنهان می‌کند URL فیلد
63+
- `status` (بله/خیر) -- .را نشان می‌دهد یا پنهان می‌کند. باز هم، اکثر مرورگرها آن را مجبور به نمایش می‌کنند status bar
64+
- `resizable` (بله/خیر) -- .اجازه می‌دهد تا تغییر اندازه را برای پنجره جدید غیرفعال کنید. توصیه نمی‌شود
65+
- `scrollbars` (بله/خیر) -- .اجازه می‌دهد تا نوارهای اسکرول را برای پنجره جدید غیرفعال کنید. توصیه نمی‌شود.
6666

6767

68-
There is also a number of less supported browser-specific features, which are usually not used. Check <a href="https://developer.mozilla.org/en/DOM/window.open">window.open in MDN</a> for examples.
68+
همجنین، تعدادی ویژگی خاص مرورگر وجود دارند که کمتر پشتیبانی می‌شوند که معمولا از آن‌ها استفاده نمی‌شود. برای مثال، <a href="https://developer.mozilla.org/en/DOM/window.open">window.open در MDN</a> را بررسی کنید.
6969

70-
## Example: a minimalistic window
70+
## مثال: یک پنجره‌ی minimalistic
7171

72-
Let's open a window with minimal set of features, just to see which of them browser allows to disable:
72+
بیایید یک پنجره با حداقل مجموعه‌ای ویژگی‌ها باز کنیم،‌ فقط برای آن که ببینیم مرورگر کدام یکی از آن‌ها را غیرفعال می‌کند:
7373

7474
```js run
7575
let params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
@@ -78,9 +78,9 @@ width=0,height=0,left=-1000,top=-1000`;
7878
open('/', 'test', params);
7979
```
8080

81-
Here most "window features" are disabled and window is positioned offscreen. Run it and see what really happens. Most browsers "fix" odd things like zero `width/height` and offscreen `left/top`. For instance, Chrome open such a window with full width/height, so that it occupies the full screen.
81+
اینجا اکثر "ویژگی‌های پنجره" غیرفعال شده‌اند و پنجره خارج صفحه قرار می‌گیرد. آن را اجرا کنید و ببینید واقعا چه اتفاقی می‌افتد. اکثر مرورگرها موارد عجیب و غریب مثل `width/height` صفر و `left/top` خارج از صفحه را درست می‌کنند. برای مثال، chrome همچین پنجره‌ای را با عرض/ارتفاع کامل باز می‌کند تا تمام صفحه را اشغال کند.
8282

83-
Let's add normal positioning options and reasonable `width`, `height`, `left`, `top` coordinates:
83+
بیایید گزینه‌های موقعیت‌یابی عادی و مختصات `عرض`، `ارتفاع`، `چپ`، `بالا` را اضافه کنیم:
8484

8585
```js run
8686
let params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
@@ -89,14 +89,14 @@ width=600,height=300,left=100,top=100`;
8989
open('/', 'test', params);
9090
```
9191

92-
Most browsers show the example above as required.
92+
اکثر مرورگرها مثال بالا را در صورت لزوم نشان می دهند.
9393

94-
Rules for omitted settings:
94+
قوانین مربوط به تنظیمات حذف شده:
9595

96-
- If there is no 3rd argument in the `open` call, or it is empty, then the default window parameters are used.
97-
- If there is a string of params, but some `yes/no` features are omitted, then the omitted features assumed to have `no` value. So if you specify params, make sure you explicitly set all required features to yes.
98-
- If there is no `left/top` in params, then the browser tries to open a new window near the last opened window.
99-
- If there is no `width/height`, then the new window will be the same size as the last opened.
96+
- اگر هیچ آرگومان سومی در فراخوانی `open` نیست یا خالی است، آنگاه پارامترهای پیش‌فرض پنجره استفاده می‌شوند.
97+
- اگر رشته‌ای از params وجود دارد اما بعضی از ویژگی‌های `yes/no` حذف شده‌اند،‌ آنگاه فرض می‌شود که ویژگی‌های حذف‌شده مقدار `no` را دارند. اگر پارامترها را مشخص می‌کنید،‌مطمئن شوید که تمام ویژگی‌های مورد نیاز به صراحت روی yes تنظیم شده‌اند.
98+
- اگر هیچ `left/top`ای در params وجود ندارد، مرورگر تلاش می‌کند که پنجره‌ای جدید را نزدیک آخرین پنجره‌ی باز شده، باز کند.
99+
- اگر هیچ `width/height`ای وجود ندارد، پنجره‌ی جدید همان اندازه‌ی آخرین پنجره‌ی باز شده را خواهد داشت.
100100

101101
## Accessing popup from window
102102

0 commit comments

Comments
 (0)