Last change
on this file since 490 was
490,
checked in by hendrikvanantwerpen, 11 years ago
|
- Mark content as dirty to prevent moving away from unsaved data.
- Better change propagation from lists and our own widgets.
- Generate notifications for errors and show correct message.
- Moved all path/url generation to the class stores, not everywhere we
use it.
- Give user always a choice between Save and Save & Close.
- Better refresh behaviour on form changes and saves.
- Don't generate duplicate code error when existing object is the one
you're storing.
|
File size:
872 bytes
|
Line | |
---|
1 | define([ |
---|
2 | "./Content", |
---|
3 | "./Path", |
---|
4 | "dijit/_TemplatedMixin", |
---|
5 | "dijit/_WidgetsInTemplateMixin", |
---|
6 | "dijit/layout/BorderContainer", |
---|
7 | "dojo/_base/declare", |
---|
8 | "dojo/_base/lang", |
---|
9 | "dojo/hash" |
---|
10 | ], function(Content, Path, _TemplatedMixin, _WidgetsInTemplateMixin, BorderContainer, declare, lang, hash) { |
---|
11 | var Page = declare([BorderContainer,_TemplatedMixin,_WidgetsInTemplateMixin],{ |
---|
12 | templateString: '<div>Empty page.</div>', |
---|
13 | die: function(msg) { |
---|
14 | Content.set(new Page({templateString:'<div>Error: '+msg+'</div>'})); |
---|
15 | }, |
---|
16 | notify: lang.hitch(Content,'notify'), |
---|
17 | setURL: function(url,opts,addToHistory) { |
---|
18 | hash(Path.format(url,opts),addToHistory !== true); |
---|
19 | }, |
---|
20 | markDirty: lang.hitch(Content,'markDirty'), |
---|
21 | markClean: lang.hitch(Content,'markClean') |
---|
22 | }); |
---|
23 | return Page; |
---|
24 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.