Sencha Touch - How to change sdk path - extjs

After creating a projects with Sencha Touch SDK folder as the parent the projects inside of it, I want to change the separate projects each one having it own touch folder, like illustrated bellow :
Before :
touch-sdk/
project1/
project2/
project3/
...
After :
project1/
touch-sdk/
...
project2/
touch-sdk/
...
project3/
touch-sdk/
...
What should I change to make this happen ?

You might want to take a look at Sencha Touch Workspaces.
But to answer your question.
Find the file
project/.sencha/app/sencha.cfg
find the line
app.framework=touch
and change it to the path (based on project) you want it to be

Related

Change the path search order

This is the current search path order:
Element file aside/user-panel.php could not be found.
The following paths were searched:
[1].../vendor/maiconpinto/cakephp-adminlte-theme/templates/element/aside/user-panel.php
[2].../templates/element/aside/user-panel.php
[3].../vendor/cakephp/cakephp/templates/element/aside/user-panel.php
How can I change the order so current [2] is search as first?
The intention is that I don't want to make an edits in the original plugin templates. I rather want to copy them into the project directories and adapt them there.
EDIT
I am using CakePHP 4.1.0
Customize Layout From release 1.0.6
/ src/Controller/AppController.php
use Cake\Core\Configure;
public function beforeRender(Event $event)
{
// Overwrite AppView class
$this->viewBuilder()->setClassName('AdminLTE.AdminLTE');
}
After you enable the AdminLTEView class in the AppController.php file, you can overwrite any View file, only by creating the Plugin/AdminLTE/ folder inside the Template folder.
For example, to overwrite the elements files, you must create them as follow:
templates/plugin/AdminLTE/element/nav-top.php
templates/plugin/AdminLTE/element/aside-main-sidebar.php
templates/plugin/AdminLTE/element/aside/user-panel.php
templates/plugin/AdminLTE/element/aside/form.php
templates/plugin/AdminLTE/element/aside/sidebar-menu.php
templates/plugin/AdminLTE/element/aside-control-sidebar.php
templates/plugin/AdminLTE/element/footer.php
read more at plugin doc:
https://github.com/maiconpinto/cakephp-adminlte-theme/wiki/Customize-Layout
Salines' asnwer isn't applicable for CakePHP 4.x - see this upgrade guide. I accepted his answer as Salines put me into the right direction even it isn't answered 100% because I was looking for a general function.
As it's described in the link Salines mentioned https://github.com/maiconpinto/cakephp-adminlte-theme/wiki/Customize-Layout I provide here now the correct paths for CakePHP 4.x
templates/plugin/AdminLTE/element/nav-top.php
templates/plugin/AdminLTE/element/aside-main-sidebar.php
templates/plugin/AdminLTE/element/aside/user-panel.php
templates/plugin/AdminLTE/element/aside/form.php
templates/plugin/AdminLTE/element/aside/sidebar-menu.php
templates/plugin/AdminLTE/element/aside-control-sidebar.php
templates/plugin/AdminLTE/element/footer.php

WebStorm test shortcut

Does anyone know why the shortcut to go to the tests for a given class (cmd+shift+t) doesn't work in WebStorm as it does in IntelliJ Idea, or how one can enable it?
Cmd+Shift+T does work in WebStorm; navigation is based on test names (i.e. marking folder as test root won't help here), e.g. performing Navigate | Test inside a file named My.js will navigate you to MySpec.js file.
Patterns are hardcoded to *Spec.js, *_spec.js, *-spec.js (+same patterns with "test" instead of "spec"). Note that if the file extensions differ (jsx > js), it won't work..
We have a feature request for making patterns configurable, WEB-29053; please feel free to vote for it
You need to mark the root test folder as such, you can do this by marking it by right clicking, "Mark Directory as->Test Sources Root" as below:
Or alternatively by the project preferences->directories as below:
After this one should be able to navigate between tests and their source using the cmd+shift+t shortcut.

CakePHP2.x Plugin consisting of single Pages view

My understanding of the CakePHP2 doc leads me to believe I can create a simple plugin that consists of a single view and that view can (if done correctly) override the default view.
For example, if the application has a app/View/Pages/foo.ctp that simply displays the text "Foo", then a Plugin in app/Plugin/Bar/View/Pages/foo.ctp that contains the text "Bar"
I've made sure that the bootstrap.php loads the plugin with CakePlugin::load('Bar');
And I've deleted app/tmp/cache//
From what I understand I'm not required by Cake to need a Controller or Model.
Yet, the application only displays "Foo" instead of the intended override of displaying "Bar".
From what I've described, what parts of my understanding or implementation approach seem wrong? (And why?) And what are the simple/better ways to implement this plugin view?
TIA
(I have read http://book.cakephp.org/2.0/en/plugins.html and http://book.cakephp.org/2.0/en/views.html)
Themes?
A theme is just a collection of template files that can be used to override the templates used in an application; whereas plugins also contain classes - are you looking for themes?
Creating a template in a plugin is not enough
Alone is not sufficient to just create a template file and load a plugin. To render it you'll need to either:
Explicitly render the file
I.e. In any controller:
$this->render('Bar.template_name')
Create an actual plugin
I.e. Create plugin files:
$ Console\cake bake plugin Bar
$ Console\cake bake controller Some --plugin Bar
$ etc.
$ echo "Something" > Plugin/Bar/View/Some/index.ctp
And request: http://yourapp.com/bar/index
See the docs on how to create a plugin for more information.

Custom theme in ExtJS pointing to wrong image folders

I've create a custom theme using Sencha ExtJS and the compass compile and sencha splice commands.
I have a folder structure as follows:
/ext-4.1.0 -- This is where the stock SDK resides
/resources -- copied from the SDK template, as per the instructions
/resources/sass -- This is where my SASS and confif.rb file reside
/resources/css -- This is where compass compiles my my-ext-theme.css
/resources/images/foo/bar.gif -- This is where sencha splice creates my GIFs.
The problem is, the newly-compiled /resources/css/my-ext-theme.css is referring to all images with the relative paths like ../../ext-4.1.0/resources/themes/images/default/foo/bar.gif.
Why is my custom theme compiling to refer to the stock image folder rather than my custom images?
Here are the key parameters in my config.rb file:
$ext_path = "../../ext-4.1.0"
sass_path = File.dirname(__FILE__)
css_path = File.join(sass_path, "..", "css")
load File.join(File.dirname(__FILE__), $ext_path, 'resources', 'themes')
I don't want to pollute my ext-4.1.0 folder with custom theme files if possible.
Apparently the "bug" referred to in the documentation here applies to version 4.1.0, not just to 4.0.7. Changing the utils.rb file as described fixed the relative path problem:
http://www.sencha.com/learn/theming/

Changing Extjs 4 default MVC folder structure

I am writing an application that has both extjs and sencha touch version. my current folder structure is like
root
...extjs4application
......app
.........model
.........store
.........view
.........controller
...senchatouch2application
......app
.........model
.........store
.........view
.........controller
model and store are similar in both application so i need to organize my folder structure in such a way that both application could share single/common model and store folders. What could be the possible solution? Please help
Based on a cursory glance over the source for Ext.app.Application it looks like it's possible to change the paths without overriding anything.
The path to the app folder is controlled by the appFolder config which defaults to "app." You can change this as you see fit but it's not necessary to do so.
Also included in the application class is an undocumented config called paths which is an object containing simple (key, value) pairs. Example:
paths: {
"Ext": "/path/to/Ext",
"Ext.ux": "/path/to/Ext/ux"
// etc...
}
The Ext.app.Application constructor checks for the presence of the paths config and calls Ext.Loader#setPath for each entry. You can read more about Ext.Loader at Sencha Docs
I don't like including disclaimers with my answers, but in this case I feel I should: I haven't personally used this to create an application so I can't completely vouch for its correctness, but it should be a start. If this should fail, you may need to override or extend the library classes to suit your needs (probably either Ext.app.Application or Ext.Loader).

Resources