10

I'm trying to change default theme in ExtJs 4.2 to Neptune custom theme. How to make it for debugging?

<html>
<head>
    <title>xxx</title>
    <link rel="shortcut icon" type="image/ico" href="favicon.ico" />
    <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
    <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-custom.css">
    <script type="text/javascript" src="extjs/ext-all.js"></script>
    <script type="text/javascript" src="Scripts/App.js"></script>
</head>
<body></body>
</html>
Nail Shakirov
  • 654
  • 1
  • 8
  • 17

4 Answers4

19

You must have the following files and folders:

  1. extjs/ext-all.js
  2. extjs/ext-theme-neptune.js
  3. extjs/resources/css/ext-all-neptune.css
  4. extjs/resources/ext-theme-neptune/ext-theme-neptune-all.css
  5. extjs/resources/ext-theme-neptune/images/*.*

And your code as follows:

<html>
    <head>
        <title>xxx</title>
        <link rel="shortcut icon" type="image/ico" href="favicon.ico" />
        <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all-neptune.css">
        <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-custom.css">
        <script type="text/javascript" src="extjs/ext-all.js"></script>
        <script type="text/javascript" src="extjs/ext-theme-neptune.js"></script>
        <script type="text/javascript" src="Scripts/App.js"></script>
    </head>
    <body></body>
</html>
Appulus
  • 18,630
  • 11
  • 38
  • 46
ki11en
  • 657
  • 4
  • 24
  • what if you only have the ext-all-neptune and the ext-theme-neptune folder? do you have to preserve the whole directory structure of extjs to be able to use it? –  Nov 14 '13 at 23:01
  • You need only files listed in post, all other may be deleted. File ext-all-neptune.css and folder ext-theme-neptune enough for neptune style. – ki11en Nov 16 '13 at 10:52
5

To change to the neptune theme modify line 33 of your sencha.cfg file located in .sencha/app/sencha.cfg to

app.theme=ext-theme-neptune

After doing this run sencha app refresh in your terminal or cammand line

cclerv
  • 2,921
  • 8
  • 35
  • 43
3

I did as @ccerville said but finished with a

 sencha app build 

which did some magic to the bootstrap.css and allowed debugging page to use neptune. The 'refresh' didn't seem to make a difference, whereas the build modifies bootstrap.css which is what the 'debug' index.html uses.

Some more info available here : http://senchado.blogspot.ca/2013/03/extjs-42-app-with-custom-neptune-based.html

amackay11
  • 719
  • 1
  • 10
  • 17
-1

in app.json change line 31 where "theme" define. change it "theme": "ext-theme-neptune"

After doing this run sencha app build in your terminal or cammand line