aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/dtl/demos/demo_Blog.html
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/dtl/demos/demo_Blog.html
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/dtl/demos/demo_Blog.html')
-rw-r--r--includes/js/dojox/dtl/demos/demo_Blog.html96
1 files changed, 0 insertions, 96 deletions
diff --git a/includes/js/dojox/dtl/demos/demo_Blog.html b/includes/js/dojox/dtl/demos/demo_Blog.html
deleted file mode 100644
index c9bd990..0000000
--- a/includes/js/dojox/dtl/demos/demo_Blog.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<html>
- <head>
- <title>Testing dojox.dtl using a blog example</title>
- <script src="../../../dojo/dojo.js" djConfig="usePlainJson: true, parseOnLoad: true"></script>
- <script>
- dojo.require("dijit._Widget");
- dojo.require("dojox.dtl._HtmlTemplated");
- dojo.require("dojo.parser");
-
- dojo.declare("demo.Blog", [dijit._Widget, dojox.dtl._HtmlTemplated],
- {
- buffer: dojox.dtl.render.html.sensitivity.NODE,
- templatePath: dojo.moduleUrl("dojox.dtl.demos.templates", "blog_list.html"),
- base: {
- url: dojo.moduleUrl("dojox.dtl.demos.templates", "blog_base.html"),
- shared: true
- },
- constructor: function(props, node){
- this.list = false;
- this.blogs = {};
- this.pages = {};
- },
- postCreate: function(){
- if(!this.list){
- dojo.xhrGet({
- url: dojo.moduleUrl("dojox.dtl.demos.json.blog", "get_blog_list.json"),
- handleAs: "json"
- }).addCallback(this, "_loadList");
- }
- },
- _showList: function(obj){
- this.title = "Blog Posts";
- this.setTemplate(this.templatePath);
- },
- _showDetail: function(obj){
- var key = obj.target.className.substring(5);
-
- if(this.blogs[key]){
- this.title = "Blog Post";
- this.blog = this.blogs[key];
- this.blog.title = this.blog_list[key].title;
- this.setTemplate(dojo.moduleUrl("dojox.dtl.demos.templates", "blog_detail.html"));
- }else{
- dojo.xhrGet({
- url: dojo.moduleUrl("dojox.dtl.demos.json.blog", "get_blog_" + key + ".json"),
- handleAs: "json",
- load: function(data){
- data.key = key;
- return data;
- }
- }).addCallback(this, "_loadDetail");
- }
- },
- _showPage: function(obj){
- var key = obj.target.className.substring(5);
-
- if(this.pages[key]){
- this.title = this.pages[key].title;
- this.body = this.pages[key].body;
- this.setTemplate(dojo.moduleUrl("dojox.dtl.demos.templates", "blog_page.html"));
- }else{
- dojo.xhrGet({
- url: dojo.moduleUrl("dojox.dtl.demos.json.blog", "get_page_" + key + ".json"),
- handleAs: "json",
- load: function(data){
- data.key = key;
- return data;
- }
- }).addCallback(this, "_loadPage");
- }
- },
- _loadList: function(data){
- this.title = "Blog Posts";
- dojo.mixin(this, data);
- this.render();
- },
- _loadDetail: function(data){
- data.date = new Date(data.date);
- this.blogs[data.key] = data;
- this.title = "Blog Post";
- this.blog = data;
- this.blog.title = this.blog_list[data.key].title;
- this.setTemplate(dojo.moduleUrl("dojox.dtl.demos.templates", "blog_detail.html"));
- },
- _loadPage: function(data){
- this.pages[data.key] = data;
- dojo.mixin(this, data);
- this.setTemplate(dojo.moduleUrl("dojox.dtl.demos.templates", "blog_page.html"));
- }
- });
- </script>
- </head>
- <body>
- <div dojoType="demo.Blog" />
- </body>
-</html>