How to

ExtJS for dummies. Part 2 — ExtJS Panel

LoadCustomCssJs method in class modExtraManagerController adds to the page your styles and scripts. Let's start our first extjs script using this method.

<?php
class ThingsIndexManagerController extends modExtraManagerController {
    public function getPageTitle() {
        return 'Things';
    }
    public function getTemplateFile() {
        return dirname(__FILE__) . '/home.tpl';
    }
    public function loadCustomCssJs() {
        $this->addHtml("<script>
            Ext.onReady(function() {
                var title = 'Мой заголовок';
                var msg = 'Модель DOM готова...';
                Ext.MessageBox.alert(title,msg);
            });
        </script>");
    }
}
Илья Уткин
26 december 2017, 12:35
1
1 005
0

ExtJS for dummies. Part 1 — Namespace and Controller

We will see the creation of MODX extra step by step in the next few lessons. In the lessons we do not use ready solutions, such as modExtra or Doodles. We will take all of the steps manually.

Илья Уткин
04 december 2017, 14:29
1
869
+1