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 (

,

, , etc.) so that\nwhen you click it, an editor shows up in place of the original\ntext. Optionally, Save and Cancel button are displayed below the edit widget.\nWhen Save is clicked, the text is pulled from the edit\nwidget and redisplayed and the edit widget is again hidden.\nBy default a plain Textarea widget is used as the editor (or for\ninline values a TextBox), but you can specify an editor such as\ndijit.Editor (for editing HTML) or a Slider (for adjusting a number).\nAn edit widget must support the following API to be used:\nString getDisplayedValue() OR String getValue()\nvoid setDisplayedValue(String) OR void setValue(String)\nvoid focus()","description":null,"examples":null},{"namespace":"dijit","className":"dijit._InlineEditor","summary":"internal widget used by InlineEditBox, displayed when in editing mode\nto display the editor and maybe save\/cancel buttons. Calling code should\nconnect to save\/cancel methods to detect when editing is finished\n\nHas mainly the same parameters as InlineEditBox, plus these values:\n\nstyle: Object\nSet of CSS attributes of display node, to replicate in editor\n\nvalue: String\nValue as an HTML string or plain text string, depending on renderAsHTML flag","description":null,"examples":null},{"namespace":"dijit","className":"dijit.Menu","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.MenuItem","summary":"A line item in a Menu2\n\nMake 3 columns\nicon, label, and expand arrow (BiDi-dependent) indicating sub-menu","description":null,"examples":null},{"namespace":"dijit","className":"dijit.PopupMenuItem","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.MenuSeparator","summary":"A line between two menu items","description":null,"examples":null},{"namespace":"dijit","className":"dijit.ProgressBar","summary":"a progress widget\n\nusage:\n
","examples":null},{"namespace":"dijit","className":"dijit.form.RadioButton","summary":"Same as an HTML radio, but with fancy styling.","description":"This shared object keeps track of all widgets, grouped by name","examples":null},{"namespace":"dijit","className":"dijit.form.ComboBoxMixin","summary":"Auto-completing text box, and base class for FilteringSelect widget.\n\nThe drop down box's values are populated from an class called\na data provider, which returns a list of values based on the characters\nthat the user has typed into the input box.\n\nSome of the options to the ComboBox are actually arguments to the data\nprovider.\n\nYou can assume that all the form widgets (and thus anything that mixes\nin ComboBoxMixin) will inherit from _FormWidget and thus the \"this\"\nreference will also \"be a\" _FormWidget.","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form._ComboBoxMenu","summary":"these functions are called in showResultList","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.ComboBox","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.CurrencyTextBox","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.DateTextBox","summary":"A validating, serializable, range-bound date text box.","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.FilteringSelect","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form._FormMixin","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.Form","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.InlineEditBox","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.NumberSpinner","summary":"Number Spinner","description":"This widget is the same as NumberTextBox but with up\/down arrows added","examples":null},{"namespace":"dijit","className":"dijit.form.NumberTextBoxMixin","summary":"A mixin for all number textboxes","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.NumberTextBox","summary":"A validating, serializable, range-bound text box.\nconstraints object: min, max, places","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.HorizontalSlider","summary":"A form widget that allows one to select a value with a horizontally draggable image","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.VerticalSlider","summary":"A form widget that allows one to select a value with a vertically draggable image","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form._SliderMover","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.HorizontalRule","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.VerticalRule","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.HorizontalRuleLabels","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.VerticalRuleLabels","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.TextBox","summary":"A generic textbox field.\nServes as a base class to derive more specialized functionality in subclasses.","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.Textarea","summary":"event handlers, you can over-ride these in your own subclasses","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.TimeTextBox","summary":"NaN\nNaN","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.ValidationTextBox","summary":"default values for new subclass properties","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.MappedTextBox","summary":"A subclass of ValidationTextBox.\nProvides a hidden input field and a serialize method to override","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form.RangeBoundTextBox","summary":"A subclass of MappedTextBox.\nTests for a value out-of-range","description":null,"examples":null},{"namespace":"dijit","className":"dijit.form._FormWidget","summary":null,"description":null,"examples":null},{"namespace":"dijit","className":"dijit.form._Spinner","summary":"Mixin for validation widgets with a spinner","description":"This class basically (conceptually) extends dijit.form.ValidationTextBox.\nIt modifies the template to have up\/down arrows, and provides related handling code.","examples":null},{"namespace":"dijit","className":"dijit.layout.AccordionContainer","summary":"Holds a set of panes where every pane's title is visible, but only one pane's content is visible at a time,\nand switching between panes is visualized by sliding the other panes up\/down.\nusage:\n
\n
\n
...<\/div>\n<\/div>\n
\n

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