AXForum  
Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 19.11.2019, 16:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Navigate Into Success: Tips & Tricks: Going full screen with control add-ins in BC150
Источник: http://vjeko.com/tips-tricks-going-f...-ins-in-bc150/
==============

Long time no see here, for I don’t know which time. That’s how it is these days, life kicks in, work kicks in, stuff kicks in, and then time flies and months go between posts here.

I am currently delivering my “Developing Control Add-ins using AL language” workshop at the first pre-conf day of NAV TechDays 2019, and while my group is busy developing their control add-in, I decided to answer the question I got five minutes ago: “can we please have this piece of code”?

So, here it goes. This little trick will allow you to go full screen with your control add-in in BC150. Having a full-screen control add-in is not something that you can do with just setting properties on your controladdin object, but it’s absolutely possible. Also, this is not something you can only do with BC150 – as a matter of fact you can do it in every single version of the Business Central or Dynamics NAV web client (or tablet, or phone client for that matter). However, every single client and every single version has a different overall HTML structure, so this particular trick applies to BC150. It may work on 140, it may work on 160 in the future, but it also may not.

The principle is the same, though: you hide unnecessary screen elements, and you make your control add-in iframe element full width and full height, and that’s it.

This is what your controladdin object must declare:



And then, this is what your control add-in initialization JavaScript code should do (typically you’d put this into your startup script):



function initialize() { function fill(frame) { if (!frame) return; frame.style.position = "fixed"; frame.style.width = "100vw"; frame.style.height = "100vh"; frame.style.margin = "0"; frame.style.border = "0"; frame.style.padding = "0"; frame.style.top = "0"; frame.style.left = "0"; frame.ownerDocument.querySelector("div.nav-bar-area-box").style.display = "none"; frame.ownerDocument.querySelector("div.ms-nav-layout-head").style.display = "none"; } window.top.document.getElementById("product-menu-bar").style.display = "none"; fill(window.frameElement); fill(window.frameElement.ownerDocument && window.frameElement.ownerDocument.defaultView && window.frameElement.ownerDocument.defaultView.frameElement);}

And that’s it.

Good luck full-screening!

Read this post at its original location at http://vjeko.com/tips-tricks-going-f...-ins-in-bc150/, or visit the original blog at http://vjeko.com. 5e33c5f6cb90c441bd1f23d5b9eeca34The post Tips & Tricks: Going full screen with control add-ins in BC150 appeared first on Vjeko.com.




Источник: http://vjeko.com/tips-tricks-going-f...-ins-in-bc150/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Navigate Into Success: Using Font Awesome icons in control add-ins Blog bot NAV: Blogs 0 29.05.2019 19:14
Navigate Into Success: Abusing Images property to load HTML in control add-ins Blog bot NAV: Blogs 0 12.12.2018 00:17
Navigate Into Success: Deploying control add-ins during development in NAV 2016 Blog bot Dynamics CRM: Blogs 0 13.11.2015 10:00
Navigate Into Success: What’s New in NAV 2016: Control Add-ins Blog bot Dynamics CRM: Blogs 0 12.10.2015 10:00
Navigate Into Success: Goodies from the Control Add-ins session at NAV TechDays 2014 Blog bot Dynamics CRM: Blogs 0 21.11.2014 19:24
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 16:37.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.