From e44a7e37b6c7b5961adaffc62b9042b8d442938e Mon Sep 17 00:00:00 2001 From: mensonge Date: Thu, 13 Nov 2008 09:49:11 +0000 Subject: New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dijit/tests/_data/categories.json | 12 ++++ .../js/dijit/tests/_data/categoriesNested.json | 13 +++++ includes/js/dijit/tests/_data/countries.json | 45 +++++++++++++++ includes/js/dijit/tests/_data/dijits.json | 1 + includes/js/dijit/tests/_data/states.json | 64 ++++++++++++++++++++++ includes/js/dijit/tests/_data/treeTest.json | 22 ++++++++ 6 files changed, 157 insertions(+) create mode 100644 includes/js/dijit/tests/_data/categories.json create mode 100644 includes/js/dijit/tests/_data/categoriesNested.json create mode 100644 includes/js/dijit/tests/_data/countries.json create mode 100644 includes/js/dijit/tests/_data/dijits.json create mode 100644 includes/js/dijit/tests/_data/states.json create mode 100644 includes/js/dijit/tests/_data/treeTest.json (limited to 'includes/js/dijit/tests/_data') diff --git a/includes/js/dijit/tests/_data/categories.json b/includes/js/dijit/tests/_data/categories.json new file mode 100644 index 0000000..3717e1e --- /dev/null +++ b/includes/js/dijit/tests/_data/categories.json @@ -0,0 +1,12 @@ +{ + identifier: 'id', + label: 'name', + items: [ + { id: '0', name:'Foods', numberOfItems:1, children:[ {_reference: '1'}, {_reference: '2'}, {_reference: '3'} ] }, + { id: '1', name:'Fruits', numberOfItems:1, children:[ {_reference: '4'} ] }, + { id: '4',name:'Citrus', numberOfItems:1, items:[ {_reference: '5'} ] }, + { id: '5', name:'Orange'}, + { id: '2', name:'Vegetables', numberOfItems:0}, + { id: '3', name:'Cereals', numberOfItems:0} + ] +} diff --git a/includes/js/dijit/tests/_data/categoriesNested.json b/includes/js/dijit/tests/_data/categoriesNested.json new file mode 100644 index 0000000..05fb89c --- /dev/null +++ b/includes/js/dijit/tests/_data/categoriesNested.json @@ -0,0 +1,13 @@ +{ + identifier: 'id', + label: 'name', + items: [ + { id: '0', name:'Fruits', numberOfItems:1, children:[ + { id: '1',name:'Citrus', numberOfItems:1, items:[ + { id: '4', name:'Orange'} + ]} + ]}, + { id: '2', name:'Vegetables', numberOfItems:0}, + { id: '3', name:'Cereals', numberOfItems:0} + ] +} diff --git a/includes/js/dijit/tests/_data/countries.json b/includes/js/dijit/tests/_data/countries.json new file mode 100644 index 0000000..3f16d0b --- /dev/null +++ b/includes/js/dijit/tests/_data/countries.json @@ -0,0 +1,45 @@ +{ identifier: 'name', + label: 'name', + items: [ + { name:'Africa', type:'continent', population:'900 million', area: '30,221,532 sq km', + timezone: '-1 UTC to +4 UTC', + children:[{_reference:'Egypt'}, {_reference:'Kenya'}, {_reference:'Sudan'}] }, + { name:'Egypt', type:'country' }, + { name:'Kenya', type:'country', + children:[{_reference:'Nairobi'}, {_reference:'Mombasa'}] }, + { name:'Nairobi', type:'city' }, + { name:'Mombasa', type:'city' }, + { name:'Sudan', type:'country', + children:{_reference:'Khartoum'} }, + { name:'Khartoum', type:'city' }, + { name:'Asia', type:'continent', + children:[{_reference:'China'}, {_reference:'India'}, {_reference:'Russia'}, {_reference:'Mongolia'}] }, + { name:'China', type:'country' }, + { name:'India', type:'country' }, + { name:'Russia', type:'country' }, + { name:'Mongolia', type:'country' }, + { name:'Australia', type:'continent', population:'21 million', + children:{_reference:'Commonwealth of Australia'}}, + { name:'Commonwealth of Australia', type:'country', population:'21 million'}, + { name:'Europe', type:'continent', + children:[{_reference:'Germany'}, {_reference:'France'}, {_reference:'Spain'}, {_reference:'Italy'}] }, + { name:'Germany', type:'country' }, + { name:'France', type:'country' }, + { name:'Spain', type:'country' }, + { name:'Italy', type:'country' }, + { name:'North America', type:'continent', + children:[{_reference:'Mexico'}, {_reference:'Canada'}, {_reference:'United States of America'}] }, + { name:'Mexico', type:'country', population:'108 million', area:'1,972,550 sq km', + children:[{_reference:'Mexico City'}, {_reference:'Guadalajara'}] }, + { name:'Mexico City', type:'city', population:'19 million', timezone:'-6 UTC'}, + { name:'Guadalajara', type:'city', population:'4 million', timezone:'-6 UTC' }, + { name:'Canada', type:'country', population:'33 million', area:'9,984,670 sq km', + children:[{_reference:'Ottawa'}, {_reference:'Toronto'}] }, + { name:'Ottawa', type:'city', population:'0.9 million', timezone:'-5 UTC'}, + { name:'Toronto', type:'city', population:'2.5 million', timezone:'-5 UTC' }, + { name:'United States of America', type:'country' }, + { name:'South America', type:'continent', + children:[{_reference:'Brazil'}, {_reference:'Argentina'}] }, + { name:'Brazil', type:'country', population:'186 million' }, + { name:'Argentina', type:'country', population:'40 million' } +]} diff --git a/includes/js/dijit/tests/_data/dijits.json b/includes/js/dijit/tests/_data/dijits.json new file mode 100644 index 0000000..160581b --- /dev/null +++ b/includes/js/dijit/tests/_data/dijits.json @@ -0,0 +1 @@ +{"timestamp":1193692111,"items":[{"namespace":"dijit","className":"dijit.ColorPalette","summary":"Grid showing various colors, so the user can pick a certain color","description":null,"examples":null},{"namespace":"dijit","className":"dijit.Declaration","summary":"The Declaration widget allows a user to declare new widget\nclasses directly from a snippet of markup.","description":null,"examples":null},{"namespace":"dijit","className":"dijit.DialogUnderlay","summary":"the thing that grays out the screen behind the dialog\n\nTemplate has two divs; outer div is used for fade-in\/fade-out, and also to hold background iframe.\nInner div has opacity specified in CSS file.","description":null,"examples":null},{"namespace":"dijit","className":"dijit.Dialog","summary":"Pops up a modal dialog window, blocking access to the screen\nand also graying out the screen Dialog is extended from\nContentPane so it supports all the same parameters (href, etc.)","description":null,"examples":null},{"namespace":"dijit","className":"dijit.TooltipDialog","summary":"Pops up a dialog that appears like a Tooltip","description":null,"examples":null},{"namespace":"dijit","className":"dijit.Editor","summary":"A rich-text Editing widget","description":null,"examples":null},{"namespace":"dijit","className":"dijit.InlineEditBox","summary":"Behavior for an existing node (
,
This is some text<\/p>\n...\n<\/div>","description":null,"examples":null},{"namespace":"dijit","className":"dijit.layout.AccordionPane","summary":"AccordionPane is a ContentPane with a title that may contain another widget.\nNested layout widgets, such as SplitContainer, are not supported at this time.","description":null,"examples":null},{"namespace":"dijit","className":"dijit.layout.ContentPane","summary":"A widget that acts as a Container for other widgets, and includes a ajax interface","description":"A widget that can be used as a standalone widget\nor as a baseclass for other widgets\nHandles replacement of document fragment using either external uri or javascript\ngenerated markup or DOM content, instantiating widgets within that content.\nDon't confuse it with an iframe, it only needs\/wants document fragments.\nIt's useful as a child of LayoutContainer, SplitContainer, or TabContainer.\nBut note that those classes can contain any widget as a child.\nexample:\nSome quick samples:\nTo change the innerHTML use .setContent('new content<\/b>')\n\nOr you can send it a NodeList, .setContent(dojo.query('div [class=selected]', userSelection))\nplease note that the nodes in NodeList will copied, not moved\n\nTo do a ajax update use .setHref('url')","examples":null},{"namespace":"dijit","className":"dijit.layout.LayoutContainer","summary":"Provides Delphi-style panel layout semantics.\n\ndetails\nA LayoutContainer is a box with a specified size (like style=\"width: 500px; height: 500px;\"),\nthat contains children widgets marked with \"layoutAlign\" of \"left\", \"right\", \"bottom\", \"top\", and \"client\".\nIt takes it's children marked as left\/top\/bottom\/right, and lays them out along the edges of the box,\nand then it takes the child marked \"client\" and puts it into the remaining space in the middle.\n\nLeft\/right positioning is similar to CSS's \"float: left\" and \"float: right\",\nand top\/bottom positioning would be similar to \"float: top\" and \"float: bottom\", if there were such\nCSS.\n\nNote that there can only be one client element, but there can be multiple left, right, top,\nor bottom elements.\n\nusage\n