[OPEN] [#1640] [4.8.1] Desktop window not getting maximized and TopBar behind windows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [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

    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
    Attached Files
    Last edited by geoffrey.mcgill; Apr 30, 2019 at 9:06 PM.

Similar Threads

  1. Replies: 8
    Last Post: Nov 15, 2017, 2:06 PM
  2. [CLOSED] Count open windows on the desktop
    By ermanni.info in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 16, 2014, 7:25 PM
  3. [CLOSED] Show Desktop window maximized - strange behavior
    By FAS in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Apr 03, 2012, 5:58 PM
  4. [CLOSED] Maximized window doesn't remain maximized
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Feb 07, 2012, 3:32 PM
  5. Replies: 1
    Last Post: Mar 17, 2009, 1:17 AM

Posting Permissions