Javascript-форум (https://javascript.ru/forum/)
-   ExtJS (https://javascript.ru/forum/extjs/)
-   -   Как подключить ExtJS 6? (https://javascript.ru/forum/extjs/57834-kak-podklyuchit-extjs-6-a.html)

potkin 22.08.2015 14:31

Как подключить ExtJS 6?
 
Добрый день!
Собственно: Как подключить ExtJS 6?
Заранее спасибо!

novikov 22.08.2015 16:08

Без Sencha Cmd как-то так:

<head>
     <title>Hello World</title>
        <link rel="stylesheet" type="text/css" href="ext/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
        <script type="text/javascript" src="ext/build/ext-all-debug.js"></script>
        <script type="text/javascript" src="ext/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>


документация

potkin 22.08.2015 17:38

Таких путей даже нет, кроме "ext/build/ext-all-debug.js".
Версия gpl 6.0.0.640
#Sat, 27 Jun 2015 22:31:20 -0700
build.number=640
version.build=640
version.release=6.0.0
version.full=6.0.0.640
build.version=6.0.0.640
ext.version.number=6.0.0.640

version.major=6
version.minor=0
version.patch=0
git.current.hash=134671ed5b6bf074e014e83502b615cd2e26a515

novikov 22.08.2015 18:40

Вложений: 1
скачал 6.0.0 и распаковал. Мда, что-то не так с путями.

<html>

<head>

	<title>Hello World</title>

	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

	<link rel="stylesheet" type="text/css" href="ext-6.0.0/build/classic/theme-neptune/resources/theme-neptune-all.css">

	<script type="text/javascript" src="ext-6.0.0/build/ext-all-debug.js"></script>
	<script type="text/javascript" src="ext-6.0.0/build/classic/theme-neptune/theme-neptune.js"></script>

	<script>
	Ext.onReady( function() {
		Ext.create("Ext.panel.Panel", {
			title: "Panel",
			renderTo: Ext.getBody()
		});
	});
	</script>

</head>

<body></body>

</html>

potkin 24.08.2015 12:43

Да, все работает )))
Сенкью!

potkin 31.08.2015 10:03

novikov,
Цитата:

Без Sencha Cmd как-то так:
А если не секрет с "Sencha Cmd" как?

kolka 31.08.2015 15:30

Цитата:

Сообщение от potkin
А если не секрет с "Sencha Cmd" как?

Sencha Cmd Docs

novikov 06.09.2015 14:54

Самое простое:

1. установить Sencha Cmd
2. скачать библиотеку ExtJs 6
3. создать для приложения директорию YourApplicationName и запустить в ней на исполнение команду:
sencha -sdk /your/path/to/extjs6 generate app YourApplicationName ./
4. запустить команду
sencha app build
5. изучить содержимое файлов index.html и build/production/YourApplicationName/index.html

novikov 06.09.2015 16:02

Ищу новую работу, делаю тестовое задание и вот прямо только что подключил в шаблон модуля ZF2 собранное приложение таким образом:

<?php 
$this->headLink()->appendStylesheet('/js/ext/UserProfile/build/production/UserProfile/classic/resources/UserProfile-all.css');
$this->headScript()->appendScript('Ext = window.Ext || {}; Ext.Boot={}; Ext.platformTags={};', 'text/javascript', array('noescape' => true)); 
$this->headScript()->appendFile('/js/ext/UserProfile/build/production/UserProfile/classic/app.js', 'text/javascript'); 
?>


Часовой пояс GMT +3, время: 16:07.