dojo.provide("dojox.widget.SortList"); dojo.experimental("dojox.widget.SortList"); // level: prototype, designed for dijit.chat.demo dojo.require("dijit.layout._LayoutWidget"); dojo.require("dijit._Templated"); dojo.declare("dojox.widget.SortList", [dijit.layout._LayoutWidget, dijit._Templated], { // summary: // A sortable unordered-list with a fixed header for use in dijit.demos.chat // for demonstration purposes only for now. feel free to make API suggestions // or fixes. // // title: String // The title in the header title: "", // heading: String // In the event a parent container is expecting a title="" attribute, set it for the parent // via title, and the title of this widget via heading="" ... assuming you want different // titles for each. eg: TabContainer, AccordionContainer, etc. heading: "", // descending: Boolean // Toggle sort order based on this value. descending: true, // selected: Array // A list of the selected `
  • ` nodes at any given time. selected: null, // sortable: Boolean // toggle to enable/disable sorting sortable: true, // FIXME: this is really simple store support store: "", key: "name", baseClass: "dojoxSortList", templateString: dojo.cache("dojox.widget","SortList/SortList.html"), _addItem: function(item){ dojo.create("li", { innerHTML: this.store.getValue(item, this.key).replace(/bStr){ return 1; } if(aStr