We are migrating a web application from ExtJS 4 to ExtJS 5.
Testing the index.html results in the following error (outputted by the Firefox-FireBug-console):
NetworkError: 404 Not Found - http://localhost:8080/ext/build/examples/ux/grid/FiltersFeature.js?_dc=1414147197935
I have already searched for the FilterFeatures.js-file inside the directory, but it isn't there.
According to the "Whats New in ExtJS 5.0"-site this file was so popular, that they thought it would be wise to move it.
Can someone tell me how to include this file or the functionality, so that the error vanishes?
I have already tried to add the following to my app.js file:
Ext.Loader.setPath('Ext.ux', './ext/build/examples/ux');
Ext.application({
...
requires: [
'Ext.ux.grid.FiltersFeature'
],
...
});
But the error persists. I think i need to get a reference to an object that is now hidden somewhere else.
I just dont know how to reference it, because i dont know the js-file it is now placed in and how to do it syntactically correct in Ext JS 5.
The basics are in the link you provided:
They removed the feature Ext.ux.grid.FiltersFeature (ftype: filters).
They introduced a plugin Ext.grid.filters.Filters (ptype: gridfilters)
as an enhanced replacement.
So you will have to rework your grids manually to use the new plugin instead of the old feature.
Good luck.
Glad to share Ext Js up gradation experience , Please check this link Ext Js 4 to 5 Migration Experience. Have a Happy Migration. Thanks
Related
I have an MS MVC deployment that is looking for a subscript for TinyMCE "theme.js" and not finding it because the file is theme.min.js. How do I get MVC to look for the minified file?
The tinymce file is tinyMCE.min.js, so it is finding that one. Is this a problem with setting TinyMCE or MS MVC?
Long explanation : We are in the process of implementing TinyMCE on a Microsoft MVC page. It was working locally but would not run when deployed to the server. It was failing with a 404, file not found for the file :
PROJECT_ROOT/bundles/themes/modern/theme.js
This was not the location of the theme file it was looking for and after a little research I found out that you needed to set the tinymce.baseURL property. When I did this it helped a little by changing the location in the error to the actual location of the file :
PROJECT_ROOT/Scripts/libs/tinymce/themes/modern/theme.js
The problem is that for some reason it was looking for the un-minified file theme.js and not theme.min.js. If I change the name to theme.js it works.
I thought that MVC and/or TinyMCE would do some magic to get the right name. Is there a setting I need to change?
You need to set tinymce.suffix = '.min'; before you init TinyMCE
tinymce.suffix = '.min';
tinymce.baseURL = '/js/tinymce';
tinymce.init({
selector: '#editor',
menubar: false,
plugins: 'code'
});
TinyMCE should work out to load minified (or non-minified) files based on which TinyMCE file you load (tinymce.js or tinymce.min.js).
Not sure what's happening in your case but that logic appears to be failing.
If you grab the DEV package from https://www.tiny.cloud/get-tiny/self-hosted/ it would come with both the minified and non-minified versions of each file so the editor would find what it needs at runtime.
Note: The code in the minified and non-minified files functions just the same so from a functionality perspective it does not really matter if theme.min.js or theme.js code is loaded. It only add ~200K to the file size so even that is immaterial.
I think I found the solution for this. There is a property you can set in the tinymce object called "suffix" that resolved this for me.
So, for the first part I set a rootURL property in the page calling TinyMCE, and then added the line tinymce.baseURL = rootURL + 'Scripts/libs/tinymce' just before the tinymce.init.
Then, to get it to find the theme.min.js set tinymce.suffix = '.min'
This seems to have resolved the issue. Not sure if this is a hack solution but it is working. If anyone has a better way to do it please let me know.
According to the documentation here:
https://scn.sap.com/thread/3502503
http://jsbin.com/openui5-notepad-control-with-its-own-library-used-in-xmlview/1/edit?html,output
I build the following folder structure with following files:
/my/themes/sap_bluecrystal/library.css
/my/library.js
/my/Square.js
Now I am asking me how to load the library (inside Component.js) correct.
I tried following in Component.js
jQuery.sap.registerModulePath("my", "./my");
And in some View:
jQuery.sap.require("my.Square");
...
new my.Square({
text : "Test",
size : "200px"
})
All in all the Square control seems to be usable but the library.js and library.css is not loaded at all.
Any idea how to do it right?
Using bootstrap XML code inside index.html would not work if the app is running inside Fiori Launchpad.
Bonus question: Where to deploy a custom library inside SAP to be usable by multiple apps? One idea (but maybe that's wrong) is to create a BSP application just containing the library code?
The right way to load the library would be (instead of jQuery.sap.require):
sap.ui.getCore().loadLibrary("my");
This will load a "library-preload.json" file (if available) and also include the theme resources.
See https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.core.Core.html#loadLibrary
First question I could solve for my own:
Replace
jQuery.sap.require("my.Square");
with
jQuery.sap.require("my.library");
Second question is still open :)
I have a Backbone application with multiple KendoUi components e.g. Grid, NumericTextBox. To display this value "12,5 h" in a numericTextBox I use this format:
this.$('.kendoHourInput').kendoNumericTextBox({
format: '#.0 h'
});
For the development Version (not optimized), everything works as expected. For the production Version, after the require.js-optimizer, this format breaks the app:
Uncaught Bad number format specifier: #
The predefined formats like "c2" or "p" works without a problem. Could it be a problem with the kendo.culture('de-DE') I use? I had similar problems with the library globalize.js, which overrides the kendo.culture. Is there a known dependency to another library who could break the optimized-code?
UPDATE
I found the library which caused the error: globalize.js There is a 2nd library with dependencies to globalize.js:
require.js-config
shim: {
...
someLib: {
deps: ['globalize']
}
}
There is a forum entry on the kendo site, with a similar problem. The solution should be to load the kendo library before the globalize library. If I take a look to the script-tags on the index.html, kendo comes before globalize. So, this is not a solution that works for me.
UPDATE
Just use the newer version of globalize.js to get it work. I use version 1.0.0-alpha.3 of globalize.js now and everything works. There is a good how to. Keep in mind that kendo should be loaded after globalize.js. The order changed
For more information, please let me know.
Thanks
Sascha
I am using Openerp (Version 7.0-20140429-231256). It was working well for a while one bad day I got a below error. And I don't find any reference to solve the exception.
OpenERP Client Error
Uncaught TypeError: Cannot read property 'prototype' of null
http://localhost:8069/web/webclient/js?db=openerp:3268
In process of debug I wanted to get to the root of problem. Some how I observed that there is openerp.init jquery triggers all the modules where its missing most of the modules which are installed..
i.e.
<script type="text/javascript">
$(function() {
var s = new openerp.init(["web", "web_kanban", "base", "base_setup", "process", "base_import", "web_view_editor", "web_calendar", "web_diagram", "board", "web_gantt", "web_graph", "web_tests"]);
var wc = new s.web.WebClient();wc.appendTo($(document.body));
});
</script>
Though I have installed many module like Point of Sale, Ware house management, Mailing etc. Its not included in init function.
I have installed several module available in openerp not community modules. Am not able to move forward with this error. Please help me how I can able to fix this problem.
Thanks In Advance.
I have solved this problem myself.
Though want to share details with you. So that anyone come across same, then this reference might be helpful.
After debugging the code have found that module information are stored in one particular table called ir_module_module, in this table it store the state of module..
i.e.
1. installed
2. uninstalled
3. to remove
So when we start openerp server then it fetch for modules for js to load which are installed state.
But many of modules are in to remove state. So I used update statement for postgressql (which is similar to mysql) to update all to remove to installed
here is update statement which is used to update table.
update ir_module_module set state ='installed' where state='to remove';
**Though I have no idea how in first play module went into to remove state.
I've upgraded a website from 4.4 to 6.0 and found some issues. Some I already solved but I keep getting one error (javascript I suppose) on events module. When I try to preview/create new/publish/save draft I get the following js error:
TypeError: startDate is null
Unable to get property 'getFullYear' of undefined or null reference
Telerik.Web.UI.WebResource.axd, line 329 character 1
var range=this.get_rangeView().getRange();
var time=this.get_timeView().getRange();
var startDateTime=new Date(time.get_start());
var endDateTime=new Date(time.get_start());
var startDate=range.get_start();
var endDate=range.get_recursUntil();
startDateTime.setFullYear(startDate.getFullYear(),startDate.getMonth(),startDate.getDate());
I reckon that this is dynamically created by Telerik sitefinity and I'm not sure how to fix it. I went to the administration area and checked the relevant configurations and it seems to be everything ok (similar configs as sitefinity 4.4).
Does anyone have an idea how to solve this? I've tried to post a sitefinity forum thread on their website but they took way to much time to answer.
Cheers
by any chance were you using external templates or a custom widget to show the events?
Sitefinity 6.0 apparently rebuilt the events module and it is no longer a simple, flat type. Instead it is a nested (hierarchical) type, with a parent calendar to which events are added (or multiple calendars if you need them).
So if you did any custom code or external template to display the content (in other words anything not out of the box that auto-upgraded itself when you updated to 6.0) you may need to rebuild this custom component to use the latest changes.
Consult the upgrade guide to 6.0 for latest breaking changes that one had the most differences, then compare your custom templates (if any) to the widget templates in the SDK: http://selarom.net/blog/2012/11/06/mapping-sitefinity-templates-from-the-sdk
I hope this is helpful!