ExtJS Desktop StartMenu (Start menu)

Source: Internet
Author: User
Tags autoload

ExtJS Desktop Start Menu level Two menu, just a simple demonstration of the implementation principle, such as the need for dynamic generation, self-transformation can, the following basic method principle:


First create a JS file to generate Start menu data:


? function Getstartmenu (APP) {var menuarray = []; var m = {launcher: {text: ' Start menu First Level a ', Iconcls: ' Icon-grid ', handler:function ()            {return false;    }, Menu: {minwidth:127, items: []}}; M.launcher.menu.items.push ({winId: ' Menua01 ', Winurl: ' abc/abcd.html ', Text: ' Start menu Second Level A01 ', MA  Ximized:false, Iconcls: ' Icon-grid ', scope:this, handler:function (src) {var desktop =            App.getdesktop ();            var win = Desktop.getwindow (' menua01 '); if (!win) {win = Desktop.createwindow ({border:false, id: ' MENUA01 ' , Title: ' Start MenutwoGrade A01 ', width:600, height:500, Maximized:true, Maximizable:true, Resizable:true, iconcls: ' Icon-grid ', hide                        Mode: ' Offsets ', constrain:true, layout: ' Fit ', loader: {                    URL: ' abc/abcd.html ', Autoload:true, scripts:true            }                });            } win.show ();        Return win;    }    }); M.launcher.menu.items.push ({winId: ' menua02 ', Winurl: ' abc/bbbb.html ', Text: ' Start menutwoLevel A02 ', Maximized:false, iconcls: ' Icon-grid ', scope:this, handler:function (SRC) {            var desktop = App.getdesktop ();            var win = Desktop.getwindow (' menua02 '); if (!win) {win = Desktop.createwindow ({border:false, id: ' MENUA02 ' , Title: ' Start MenutwoGrade A02 ', width:800, height:600, Maximized:false, Maximizable:true, Resizable:false, iconcls: ' Icon-grid ', hi                        Demode: ' Offsets ', constrain:true, layout: ' Fit ', loader: {                    URL: ' abc/bbbb.html ', Autoload:true, scripts:true            }                });            } win.show ();        Return win;    }    });    Menuarray.push (m); return Menuarray;}

In the main page introduce the file and then modify App.js, find Getmodules:function () {Delete inside the content changed to:

Getmodules:function () {
return Getstartmenu(this);
},

To implement the Start menu level two menu



ExtJS Desktop StartMenu (Start menu)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.