Sencha Architect View Disappearing after first setActiveItem - sencha-architect

Here is the problem. I have a view
Ext.define('Journal.view.CreateGoal', {
extend: 'Ext.form.Panel',
It is part of main
Ext.define('Journal.view.Main', {
extend: 'Ext.Container',
requires: [
'Journal.view.GoalList',
'Journal.view.CreateToDo',
'Journal.view.Choice',
'Journal.view.CreateGoal'
],
config: {
layout: {
type: 'card'
},
items: [
{
xtype: 'GoalList'
},
{
xtype: 'createtodo'
},
{
xtype: 'choice'
},
{
xtype: 'creategoal'
}
]
}
});
I have a button in GoalList that fires
var createGoalForm= Ext.create('Journal.view.CreateGoal');
console.log('create goal view');
Ext.Viewport.setActiveItem(createGoalForm);
The first time I press that button, everything is fine.
If I have used a back button that triggers either of these
Ext.Viewport.setActiveItem(0);
or
Ext.Viewport.setActiveItem(Journal.view.GoalList);
The next time I press the button I do not see the contents of createGoalForm
The console.log still fires, so it's getting into the function.
I tried several methods such as
Ext.Viewport.setActiveItem(Journal.view.CreateGoal);
and a few others. Each version I have tried, the first time I go to the view its fine, every other time its blank.
I have changed the autoDestroy setting to no avail.
So what am I doing wrong?
Thanks

Related

How to configure CKEditor to display centered pasted image?

I currently have a Classic themed editor configured in my angular app and my problem is that while pasting the image on the admin-side works fine as well as its positioning, it displays differently once it is retrieved on my client-side of the app. Moreover, larger images ignore the editor's container. Are there specific configurations for these?
As of now, these are my configurations configured in my angular component's HTML files.
<ckeditor [editor]="Editor" data="" (change)="change($event)"
[config]="{
toolbar:
[ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'undo', 'redo' ],
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title:'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title:'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h3', title:'Heading 3', class: 'ck-heading_heading3' }
]
}
}">
</ckeditor>

ExtJS 4 -grid selected cell color

I try to find answer for this question but I can't. So I have simple grid with cells editting by plugin (Ext.grid.plugin.CellEditing). So in such a case I see selected cell displayed in "bluebox".
but I dont want to see such a selection, I want to change this background. Any suggestion please.
Thank you Jadhav, and I see the second problem in this grid. I want to edit only two columns:
this numbers with gray backgruond and this checkbox. The first one is working good but this checkbox not (when I check it and go to other place checked position become unchecked) and can't set the same background as I set for column with numbers. This is done by:
renderer: function(value, meta) {
meta.style = "background-color:lightgray;";
}
This method, in checkbox column give me this:
Why and how to solve this?
OK, almost ok because of your help but when I change background via css I see the following result (summary row is also, partly in background color') and still don't know why and how to correct it:
You can implement using css for selected cell in CellEditing.
In this Fiddle, I have created a demo using CellEditing plugin.
Code snippet:
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.data.Store', {
storeId: 'demostore',
fields: ['name', 'email', 'phone'],
data: [{
name: 'Lisa',
email: 'lisa#simpsons.com',
phone: '555-111-1224'
}, {
name: 'Bart',
email: 'bart#simpsons.com',
phone: '555-222-1234'
}, {
name: 'Homer',
email: 'homer#simpsons.com',
phone: '555-222-1244'
}, {
name: 'Marge',
email: 'marge#simpsons.com',
phone: '555-222-1254'
}]
});
Ext.create('Ext.grid.Panel', {
title: 'Demo Data',
store: 'demostore',
cls:'my-grid',
columns: [{
header: 'Name',
dataIndex: 'name',
editor: 'textfield'
}, {
header: 'Email',
dataIndex: 'email',
flex: 1,
editor: {
xtype: 'textfield',
allowBlank: false
}
}, {
header: 'Phone',
dataIndex: 'phone'
}],
selType: 'cellmodel',
plugins: {
ptype: 'cellediting',
clicksToEdit: 1
},
height: 200,
renderTo: Ext.getBody()
});
}
});
CSS
<style>
.my-grid .x-grid-cell-selected{
background-color: transparent !important;
}
</style>
One more way you also done using on cell editor component blur event. You need to do put this below code
var selectionModel = grid.getSelectionModel();
selectionModel.deselect(selectionModel.selection.record)
Just you have to overwrite inline css, so that you can change background color i.e..,
.x-grid-row-selected .x-grid-td {
background: #ffffff;
}

How do I stop play bar jitteryness in jPlayer?

I'm having some issues with my play bar being super jittery on a site's implementation.
Getting this thing functioning and styled the same in a jsfiddle, so I have to apologize for not having one.
The example is here: http://mindevo.com/geewhiz/music-tracks.html
When you start playing the seek bar bounces very jittery and continues to do so the entire time.
How can I prevent this jitteryness?
Here is my initialize function (this page is actually a fall-back for the real AJAX-loaded page which resides on http://mindevo.com/geewhiz/ ) and for now includes only the example tracks for jplayer.
function startPlaylist() {
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Cro Magnon Man",
mp3:"http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3"
},
{
title:"Your Face",
mp3:"http://www.jplayer.org/audio/mp3/TSP-05-Your_face.mp3"
},
{
title:"Cyber Sonnet",
mp3:"http://www.jplayer.org/audio/mp3/TSP-07-Cybersonnet.mp3"
},
{
title:"Tempered Song",
mp3:"http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3"
},
{
title:"Song 5 Song",
mp3:"http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3"
},
{
title:"8 Song",
mp3:"http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3"
}
], {
swfPath: "../../dist/jplayer",
loopOnPrevious: true,
supplied: "mp3",
loop: true,
wmode: "window",
useStateClassSkin: true,
autoBlur: false,
smoothPlayBar: true,
keyEnabled: true,
preload: "auto"
});
}
Actually, setting "smoothPlayBar: false" solves this problem.
I am leaving this here for anyone else experiencing a jittery play-bar.

CKEDITOR And Styles configuration with only toolbar

I try to configure CKEDITOR in Oracle Framework "Endeca v 11.1.0" but something is wrong.
I can only configure toobar like this :
[
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
'/',
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
{ name: 'others', items: [ '-' ] },
{ name: 'about', items: [ 'About' ] }
];
and i cannot configure styles like i want.
By default i have sur styles of ckeditor and it is normal. i have not set a good style.js with good configuration.
I want to configure specific style and i have read somes documentation like this : http://docs.ckeditor.com/#!/guide/dev_styles
but how can i do that in my configuration :
CKEDITOR.stylesSet.add( 'my_styles', [
// Block-level styles
{ name: 'Blue Title', element: 'h2', styles: { 'color': 'Blue' } },
{ name: 'Red Title' , element: 'h3', styles: { 'color': 'Red' } },
// Inline styles
{ name: 'CSS Style', element: 'span', attributes: { 'class': 'my_style' } },
{ name: 'Marker: Yellow', element: 'span', styles: { 'background-color': 'Yellow' } }
]);
How can i set specific style in toolbar configuration only ??
Thx for help
I'm going to give advice that you might not find helpful :) Instead of creating a custom editor for use within Experience Manager (and then having to maintain that during upgrades, etc), it might be better instead to give them an editor UI completely separate from XM. Then, when they have their nice HTML to copy and paste it into XM.
Another idea: Instead of creating a Flex editor directly (like what you're doing), create a light-weight Flex editor that launches a popup window (where that would be a webapp hosted outside of XM directly). Then have that popup window return a block of HMTL as text. This would allow you to create a fancy editor but not be constrained by Flex.
I can't share a full code example for my second recommendation, but in Flex you can open a popup windoww by doing:
ExternalInterface.call("window.open",
popupUrl, "Select Value",
"menubar=1,resizeable=1,width=1000,height=800,location=yes,menubar=yes,scrollbars=1,toolbar=1");
... where popupUrl would be the URL of your exteranl web app.
Then, in the webapp, when you want to pass back a value, you can do:
windowOpener = window.opener.document.xmgrSwfElement;
windowOpener.selectValue(path);
window.close();
In 11.1, configuration file location of CK Editor has been changed. It is moved inside a .jar. Check ToolsAndFrameworks\11.1.0\server\workspace\state\sling_ifcr-11.1.0\startup\25\richTextEditor-11.1.0.jar file for build-config.js
Thx for your answer.
My action :
extract war file "ifcr-11.1.0.war" in
"/ToolsAndFrameworks/11.1.0/server/webapps/ifcr-11.1.0.war"
extract "richTextEditor-11.1.0.jar" in "icfr-11.1.0/WEB-INF/resources/bundles/25"
make modification on file "richTextEditor-11.1.0/content/ckeditor_4.3.3_full/ckeditor/style.js" for my specific style.
I have open build-config.js but i can't see config for styles.
i have rebuild package richTextEditor-11.1.0.jar and ifcr-11.1.0.war and restart tomcat and i can't see modification on ToolsAndFrameworks\11.1.0\server\workspace\state\sling_ifcr-11.1.0\startup\25\richTextEditor-11.1.0.jar.
i have try to delete all files and folder on ToolsAndFrameworks\11.1.0\server\workspace\state\sling_ifcr-11.1.0\startup* and restart tomcat for deploying artifact and other but my folder "ToolsAndFrameworks\11.1.0\server\workspace\state\sling_ifcr-11.1.0\startup\" is empty.
A crazy thing is my webapp run with succes without this folder and files.
are there a cache or other ?

ExtJS: How to force tabbed FormPanel fill all available space?

I want to make a tabbed formPanel fitting user's screen.
here's my code:
var form2 = new Ext.FormPanel({
labelWidth: 75,
border:false,
items: {
// removing next line affects the layout %)
xtype:'tabpanel',
activeTab: 0,
defaults:{autoHeight:true, bodyStyle:'padding:10px'},
items:[
{
title:'Personal Details',
layout:'form',
defaults: {width: 230},
defaultType: 'textfield',
items: [
{
fieldLabel: 'First Name'
}
]
},
{
title:'Phone Numbers',
layout:'form',
defaults: {width: 230},
defaultType: 'textfield',
items: [
{
fieldLabel: 'Home'
}
]
}
]
}
});
form2.render('container');
And later in my a have an , of course.
That makes a form with incredibly big width...
If I revome line with "xtype: 'tabpanel'" everything works fine (except there's no tabbed panel on screen)
Is it a bug or I forgot something. Help me figure it out, please=)
Thanks for your attention.
Set anchor and set layout : fit configs for formpanel.

Resources