Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
56427ed
migrate to Extjs 5
cristianbuj Apr 14, 2015
53835dd
fix copy event issue and update handler for onWrite event
cristianbuj Apr 15, 2015
cfda86a
fix issue in recurrence and remote examples
cristianbuj Apr 16, 2015
37a57a2
fix issue related to event handler of an copied event
cristianbuj Apr 16, 2015
2bfb620
Added missing exists() checks to language strings of recurrence widgets.
gsidler Sep 15, 2013
8603910
First version of new list view.
gsidler Jun 15, 2013
36a2dd9
Simplified configuration of default date range for list view. In the …
gsidler Jun 15, 2013
97cc175
Renamed list view to agenda view to be more in line with other widly …
gsidler Jun 15, 2013
a0fb75b
Adjustments needed after rebasing to latest version of recurrence
gsidler Jun 15, 2013
a76153d
First version of simple event list with support for grouping by month…
gsidler Jun 15, 2013
032b3f1
Minor adjustments to examples.
gsidler Jun 15, 2013
ea10f0f
Added plus-icon to "Add Event" button on agenda view.
gsidler Jun 15, 2013
b8697ce
Fix small syntax error.
gsidler Jun 15, 2013
a9bf55f
Ensure that at least one calendar view is shown.
gsidler Jun 30, 2013
1978866
Added a class to the next/prev links to be able to apply some printin…
gsidler Aug 1, 2013
8d4c085
Added English GB file with strings for Agenda view.
gsidler Sep 14, 2013
d9fa57a
Added support for client state persistency.
gsidler Sep 19, 2013
7fd6644
New events are not all-day events by default.
gsidler Apr 3, 2014
7a38d5e
Updated build file to work with the build process refactored by Brian.
gsidler Apr 3, 2014
8356ea1
Migration to extjs5: Remove addEvent() calls.
gsidler Apr 16, 2015
c2e69d3
Cleanup dirty record when editor window is closed with close tool in …
gsidler Apr 3, 2014
11887f5
Fixed error handling after copying an event. If server rejects new ev…
gsidler Apr 9, 2014
2b2c9cb
Re-insert events into event store if delete operation fails.
gsidler May 19, 2014
1c744fe
Improved sorting for hourly events. Events are sorted by three criter…
gsidler Jan 30, 2015
aaece75
Implemented a improved event layout algorithm for day body view. See …
gsidler Jan 30, 2015
6be34e8
save state of calendars after refresh
cristianbuj Mar 10, 2015
e26b953
Introduced new load mode 'dynamic-extensible'. With this mode, the ex…
gsidler Jan 30, 2015
6c7eadf
Set Ext.Loader property disableCaching to false for all the examples.…
gsidler Jan 30, 2015
eb113c6
Small fix in the test data.
gsidler Jan 30, 2015
6ec8a49
Merge remote-tracking branch 'origin/extjs5-bug-language-strings-for-…
gsidler Apr 17, 2015
b9b89b4
Merge remote-tracking branch 'origin/extjs5-extensible-feature-agenda…
gsidler Apr 17, 2015
c2ccd62
Merge remote-tracking branch 'origin/extjs5-bug-event-window-close-ha…
gsidler Apr 17, 2015
fc031c7
Merge remote-tracking branch 'origin/extjs5-fix-error-handling-after-…
gsidler Apr 17, 2015
edc4751
Merge remote-tracking branch 'origin/extjs5-fix-error-handling-after-…
gsidler Apr 17, 2015
71cb7f6
Merge remote-tracking branch 'origin/extjs5-improved-event-layout-day…
gsidler Apr 17, 2015
ed5660e
Merge remote-tracking branch 'origin/extjs5-calendars-stateful' into …
gsidler Apr 17, 2015
0ba0a1e
Merge remote-tracking branch 'origin/extjs5-faster-loading-during-dev…
gsidler Apr 17, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 73 additions & 68 deletions Extensible-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ Extensible = {
};
/**
* =================================================================================================
*
*
* THIS FILE IS FOR *DEV* MODE ONLY, NOT FOR PRODUCTION USE!
*
*
* =================================================================================================
*
*
* This is intended as a development mode only convenience so that you can configure all include
* paths for all Extensible examples in one place. For production deployment you should configure
* your application with your own custom includes and/or Ext.Loader configuration directly.
*
*
* =================================================================================================
*/
Extensible.Config = {
Expand All @@ -21,26 +21,29 @@ Extensible.Config = {
defaults: {
/**
* The mode to use for loading framework files. Valid values are:
*
*
* - 'release': minified single file (e.g. ext-all.js)
* - 'debug': (default) non-minifed single file (e.g. ext-all-debug.js)
* - 'dynamic': uses Ext.Loader to load classes individually (e.g., ext.js). NOTE: this
* option does not work for IE, which will be defaulted to the 'debug' option.
*
* - 'dynamic-extensible': Loads the Extensible framework dynically and the EXT JS framework from a
* non-minified single file. This loads much faster than the 'dynamic' mode. NOTE: This
* option does not work for IE, which will be defaulted to the 'debug' option.
*
* Typically the default of 'debug' is the best trade-off between code readability and
* load/execution speed. If you need to step into framework files frequently during
* debugging you might switch to 'dynamic' mode -- it is much slower during initial
* page load but generally provides a faster and easier debugging experience.
*
*
* Note that for debug and release modes to reflect any code or CSS changes made to Extensible
* files you must rebuild the framework after each change using the scripts provided under
* the `/build` folder (requires Java). If you cannot build the framework and you've made any
* changes to Extensible files you should use dynamic mode to ensure that changes are reflected.
*
*
* @config {String} mode
*/
mode: 'debug',

/**
* The root path to the Ext JS framework (defaults to loading 4.2.0 from the Sencha CDN via
* `http://cdn.sencha.com/ext/gpl/4.2.0/`). Path should be absolute and should end with a '/'.
Expand All @@ -61,55 +64,55 @@ Extensible.Config = {
*
* @config {String} extJsRoot
*/
extJsRoot: 'http://cdn.sencha.com/ext/gpl/4.2.0/',
extJsRoot: 'http://cdn.sencha.com/ext/gpl/5.1.0/',

/**
* The root path to the Extensible framework (defaults to the current url of this script file,
* 'Extensible-config.js', which is shipped in the root folder of Extensible). Path should
* be absolute and should end with a '/'.
*
*
* Alternate example values:
*
*
* // A custom absolute path:
* http://localhost/extensible/
* http://mydomain/extensible/1.0.1/
*
*
* @config {String} extensibleRoot
*/
extensibleRoot: null, // initialized dynamically in getSdkPath()

/**
* True to allow the default browser behavior of caching the Extensible JS and CSS files
* after initial load (defaults to true), or false to append a unique cache-buster parameter
* to the url to enforce reloading Extensible files with each page refresh (useful if you are
* actively changing and debugging Extensible code). If true, the current version number of
* Extensible will still be used to force a reload with each new version of the framework, but
* after the initial load of each version the cached files will be used.
*
*
* This option only applies when using `debug` or `dynamic` modes. In `release` mode the Extensible
* version number will be used to ensure that Extensible files are always cached after the initial
* load of each release and this option will be ignored. Note that when using `dynamic` mode you
* would additionally have to ensure that the Ext.Loader's `disableCaching` option is true in order
* to add the cache buster parameter to each dynamically-loaded class.
*
* to add the cache buster parameter to each dynamically-loaded class.
*
* Note that this option does not affect the caching of Ext JS files in any way. If you are
* using dynamic loading, the Ext Loader will govern caching, otherwise the default browser
* caching will be in effect.
*
*
* @config {Boolean} cacheExtensible
*/
cacheExtensible: true,

/**
* Language files to load for the Ext JS and Extensible frameworks. Valid values are ISO language codes of
* supported languages. See directory src/locale for a list of supported languages. Examples are:
*
*
* - 'en'
* - 'en_GB'
* - 'de'
* - 'fr'
* - etc...
*
*
* NOTE: This setting will NOT work for Ext versions < 4.1 due to how the locale files were written
* in 4.0.x. Because the 4.0.x locale files check for existence of classes by reference rather than
* by name, they do not play nicely when loaded asynchronously (Ext may load later, causing runtime
Expand All @@ -119,96 +122,98 @@ Extensible.Config = {
* work consistently with all Ext 4.x versions (just uses the Ext default English strings). As long
* as you are using 4.1+ feel free to enable this by setting the value to any supported locale code.
*/
language: null
language: null,

/**
* Name of theme used. Supported values are: 'neptune', nepture-touch', 'crisp', 'crisp-touch'.
*/
theme: 'neptune'
},

/**
* Sets up all configurable properties and writes all includes to the document.
*/
init: function() {
var me = this,
config = window.ExtensibleDefaults || {};

me.isIE = /msie/.test(navigator.userAgent.toLowerCase());

me.mode = config.mode || me.defaults.mode;
me.extJsRoot = config.extJsRoot || me.defaults.extJsRoot;
me.extensibleRoot = config.extensibleRoot || me.defaults.extensibleRoot || me.getSdkPath();
me.cacheExtensible = config.cacheExtensible || me.defaults.cacheExtensible;
me.language = config.language || me.defaults.language;
me.theme = config.theme || me.defaults.theme;

me.adjustPaths();
me.writeIncludes();
},

// private -- returns the current url to this script file, which is shipped in the SDK root folder
getSdkPath: function() {
var scripts = document.getElementsByTagName('script'),
thisScriptSrc = scripts[scripts.length - 1].src,
sdkPath = thisScriptSrc.substring(0, thisScriptSrc.lastIndexOf('/') + 1);

return sdkPath;
},

// private -- helper function for ease of deployment
adjustPaths: function() {
if (this.extensibleRoot.indexOf('ext.ensible.com') > -1) {
// If hosted at ext.ensible.com force non-debug release build includes
this.mode = 'release';
}
},

includeStylesheet: function(filePath) {
document.write('<link rel="stylesheet" type="text/css" href="' + filePath + '" />');
},

includeScript: function(filePath) {
document.write('<script type="text/javascript" src="' + filePath + '"></script>');
},

// private -- write out the CSS and script includes to the document
writeIncludes: function() {
var me = this,
cacheBuster = '?_dc=' + (me.cacheExtensible ? Extensible.version : (+new Date)),
suffixExt = '',
suffixExtensible = '';

switch (me.mode) {
case 'debug':
suffixExt = '-all-debug';
suffixExtensible = '-all-debug';
break;

case 'release':
suffixExt = '-all';
suffixExtensible = '-all'
// For release we want to refresh the cache on first load, but allow caching
// after that, so use the version number instead of a unique string
cacheBuster = '?_dc=' + Extensible.version;
break;

default:
// IE does not work in dynamic mode for the Extensible examples currently
// based on how it (mis)handles loading of scripts when mixing includes
// and in-page scripts. Make sure IE always uses the regular debug versions.
if (me.isIE) {
suffixExt = '-all-debug';
suffixExtensible = '-all-debug';
}
else {
suffixExt = '-debug';
suffixExtensible = '-bootstrap';
}
cacheBuster = '?_dc=' + (me.cacheExtensible ? Extensible.version : (+new Date));

// Include style sheets
me.includeStylesheet(me.extJsRoot + '/build/packages/ext-theme-' + me.theme + '/build/resources/ext-theme-' + me.theme + '-all.css');
if (me.mode === 'release') {
me.includeStylesheet(me.extensibleRoot + 'resources/css/extensible-all.css' + cacheBuster);
} else {
me.includeStylesheet(me.extensibleRoot + 'resources/css/calendar.css' + cacheBuster);
me.includeStylesheet(me.extensibleRoot + 'resources/css/calendar-colors.css' + cacheBuster);
me.includeStylesheet(me.extensibleRoot + 'resources/css/recurrence.css' + cacheBuster);
}
me.includeStylesheet(me.extensibleRoot + 'examples/examples.css' + cacheBuster);

// Include JS files
if (me.mode === 'debug' || me.isIE) {
// IE does not work in dynamic mode for the Extensible examples currently
// based on how it (mis)handles loading of scripts when mixing includes
// and in-page scripts. Make sure IE always uses the regular debug versions.
me.includeScript(me.extJsRoot + 'build/ext-all-debug.js');
me.includeScript(me.extensibleRoot + 'lib/extensible-all-debug.js' + cacheBuster);
} else if (me.mode === 'release') {
// For release we want to refresh the cache on first load, but allow caching
// after that, so use the version number instead of a unique string
cacheBuster = '?_dc=' + Extensible.version;
me.includeScript(me.extJsRoot + 'build/ext-all.js');
me.includeScript(me.extensibleRoot + 'lib/extensible-all.js' + cacheBuster);
} else {
if (me.mode === 'dynamic-extensible') {
me.includeScript(me.extJsRoot + 'build/ext-all-debug.js');
} else {
me.includeScript(me.extJsRoot + 'build/ext-debug.js');
}
me.includeScript(me.extensibleRoot + 'lib/extensible-bootstrap.js' + cacheBuster);
}

me.includeStylesheet(me.extJsRoot + 'resources/css/ext-all.css');
me.includeStylesheet(me.extensibleRoot + 'resources/css/extensible-all.css' + cacheBuster);
me.includeStylesheet(me.extensibleRoot + 'examples/examples.css?_dc=' + Extensible.version);

me.includeScript(me.extJsRoot + 'ext' + suffixExt + '.js');
me.includeScript(me.extensibleRoot + 'lib/extensible' + suffixExtensible + '.js' + cacheBuster);
me.includeScript(me.extensibleRoot + 'examples/examples.js?_dc=' + Extensible.version);

if (me.language) {
me.includeScript(me.extJsRoot + 'locale/ext-lang-' + me.language + '.js');
me.includeScript(me.extensibleRoot + 'src/locale/extensible-lang-' + me.language + '.js' + cacheBuster);
Expand Down
12 changes: 12 additions & 0 deletions build/resources/extensible.jsb2
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
},{
"text": "Month.js",
"path": "../../src/calendar/template/"
},{
"text": "AgendaBody.js",
"path": "../../src/calendar/template/"
},{
"text": "CalendarScrollManager.js",
"path": "../../src/calendar/dd/"
Expand Down Expand Up @@ -128,6 +131,15 @@
},{
"text": "MultiWeek.js",
"path": "../../src/calendar/view/"
},{
"text": "AgendaHeader.js",
"path": "../../src/calendar/view/"
},{
"text": "AgendaBody.js",
"path": "../../src/calendar/view/"
},{
"text": "Agenda.js",
"path": "../../src/calendar/view/"
},{
"text": "CalendarPanel.js",
"path": "../../src/calendar/"
Expand Down
31 changes: 28 additions & 3 deletions examples/calendar/TestApp/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Ext.Loader.setConfig({
enabled: true,
//disableCaching: false,
disableCaching: false,
paths: {
"Extensible": "../../../src",
"Extensible.example": "../.."
Expand Down Expand Up @@ -40,7 +40,11 @@ Ext.define('Extensible.example.calendar.TestApp.App', {
// of MemoryEventStore to see how automatic store messaging is implemented.
autoMsg: false
});


// Make the calendar stateful. This is optional. If set, the application will remember hidden
// calendars in the calendar list panel.
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

// This is the app UI layout code. All of the calendar views are subcomponents of
// CalendarPanel, but the app title bar and sidebar/navigation calendar are separate
// pieces that are composed in app-specific layout code since they could be omitted
Expand Down Expand Up @@ -105,6 +109,7 @@ Ext.define('Extensible.example.calendar.TestApp.App', {
//viewStartHour: 6,
//viewEndHour: 18,
//minEventDisplayMinutes: 15
startDay: 0,
showTime: false
},

Expand All @@ -119,14 +124,28 @@ Ext.define('Extensible.example.calendar.TestApp.App', {
multiWeekViewCfg: {
//weekCount: 3
},


agendaViewCfg: {
linkDatesToDayView: true,
dateRangeDefault: '3months'
},

listViewCfg: {
linkDatesToDayView: true,
dateRangeDefault: '3months',
simpleList: true,
groupBy: 'month'
},

// Some optional CalendarPanel configs to experiment with:
//readOnly: true,
//showDayView: false,
//showMultiDayView: true,
//showWeekView: false,
//showMultiWeekView: false,
//showMonthView: false,
showAgendaView: true,
showListView: true,
//showNavBar: false,
//showTodayText: false,
//showTime: false,
Expand All @@ -135,6 +154,12 @@ Ext.define('Extensible.example.calendar.TestApp.App', {
//title: 'My Calendar', // the header of the calendar, could be a subtitle for the app

listeners: {
'datechange': {
fn: function(vw, startDt, viewStart, viewEnd){
this.updateTitle(viewStart, viewEnd);
},
scope: this
},
'eventclick': {
fn: function(vw, rec, el){
this.clearMsg();
Expand Down
7 changes: 6 additions & 1 deletion examples/calendar/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ Ext.onReady(function(){
renderTo: 'simple',
title: 'Basic Calendar',
width: 700,
height: 500
height: 500,
activeItem: 3, // default to month view
showAgendaView: true,
showListView: true
});

//
Expand All @@ -38,6 +41,8 @@ Ext.onReady(function(){
eventStore: eventStore,
renderTo: 'panel',
title: 'Calendar with Panel Configs',
showAgendaView: true,
showListView: true,
activeItem: 1, // default to week view
width: 700,
height: 500,
Expand Down
3 changes: 3 additions & 0 deletions examples/calendar/custom-mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Ext.onReady(function(){
calendarStore: calendarStore,
renderTo: 'cal',
title: 'Custom Event Mappings',
showAgendaView: true,
showListView: true,
activeItem: 3, // default to month view
width: 800,
height: 700
});
Expand Down
Loading