Apr 30, 2019, 1:46 PM
[OPEN] [#1640] [4.8.1] Desktop window not getting maximized and TopBar behind windows
Hi I am new here
I trying ext.net for mvc and trying a short cut with a window on the desktop
I have
1. when maximize set to true its not working I used the old work around and its now maximizing
here is my code
I trying ext.net for mvc and trying a short cut with a window on the desktop
I have
1. when maximize set to true its not working I used the old work around and its now maximizing
Ext.ux.desktop.Desktop.override({ onShortcutItemClick: function (dataView, record) {
//Ext.QuickTips.disable();
console.log('onShortcutItemClick');
var me = this,
module = me.app.getModule(record.data.module),
win;
if (module && record.data.handler && Ext.isFunction(record.data.handler)) {
record.data.handler.call(this, module);
} else {
win = module && module.createWindow();
if (win && !win.maximized) { // added && !win.maximized
me.restoreWindow(win);
}
}
}
});
2. if I put a top bar the window covers it when a tooltip shows up here is my code
@{ ViewBag.Title = "Desktop - Ext.NET MVC Examples";
Layout = "~/Views/Shared/_BaseLayout.cshtml";
}
@section headtag
{
<link href="/Content/desktop.css" rel="stylesheet" />
<script>
Ext.ux.desktop.Desktop.override({
onShortcutItemClick: function (dataView, record) {
//Ext.QuickTips.disable();
console.log('onShortcutItemClick');
var me = this, module = me.app.getModule(record.data.module),
win;
if (module && record.data.handler && Ext.isFunction(record.data.handler)) {
record.data.handler.call(this, module);
}
else {
win = module && module.createWindow();
if (win && !win.maximized) { // added && !win.maximized
me.restoreWindow(win);
}
}
}
});
function closeWindow(windowName) {
console.log('Code Win');
//var el = window.Ext.ComponentQuery.query('#' + windowName);
//if (el.length > 0) {
// var win = window.Ext.getCmp(el[0].id);
// if (win.getEl() !== null) {
// win.getEl().animate({ 'width': '0px', 'height': '0px' });
// }
//}
}
function openWindow(winId, width, height) {
console.log('Open Win');
//var el = window.Ext.ComponentQuery.query('#' + winId);
//if (el.length > 0) {
// var win = window.Ext.getCmp(el[0].id);
// if (win.getEl() !== null) {
// win.getEl().animate({ 'width': width + 'px', 'height': height + 'px', 'duration': '800' });
// }
//}
}
function moveWin(winId, x, y, ww) {
console.log(x, y, ww);
var el = window.Ext.ComponentQuery.query('#' + winId);
if (el && el.length > 0) {
var win = window.Ext.getCmp(el[0].id);
if (win.getEl() !== null) {
win.maximized = false;
win.maximize();
}
}
}
var tile = function () {
Ext.net.Desktop.desktop.tileWindows();
};
var cascade = function () {
Ext.net.Desktop.desktop.cascadeWindows();
};
var initSlidePanel = function () {
this.setHeight(Ext.net.Desktop.desktop.body.getHeight());
if (!this.windowListen) {
this.windowListen = true;
this.el.alignTo(Ext.net.Desktop.desktop.body, 'tl-tr', [0, 0]);
Ext.on("resize", initSlidePanel, this);
}
};
</script>
}
@section example
{
@(
Html.X().Desktop()
.ID("Desktop1")
.Listeners(l =>
{
l.Ready.BroadcastOnBus = "App.Desktop.ready";
})
.Modules(
Html.X().DesktopModule()
.ModuleID("Hello")
)
.DesktopConfig(
Html.X().DesktopConfig().ID("DeskTop1").RTL(true)
.TopBar(
Html.X().Toolbar().Items(
Html.X().DisplayField().FieldLabel("Salam")
)
)
//.Wallpaper("~/Content/wallpapers/blue.jpg")
.ShortcutDragSelector(false)
)
)
@Html.Partial("GridWindow")
}
just put grid window from samples
Last edited by geoffrey.mcgill; Apr 30, 2019 at 10:06 PM.