Lines Matching refs:item

18        * example for a horizontal layout, this controls how each item is aligned
28 * example for a horizontal layout, this controls how each item is aligned
755 block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
756 block.item = replace(block.item, 'gm')
880 , item
935 item = {
942 for (i = 0; i < item.align.length; i++) {
943 if (/^ *-+: *$/.test(item.align[i])) {
944 item.align[i] = 'right';
945 } else if (/^ *:-+: *$/.test(item.align[i])) {
946 item.align[i] = 'center';
947 } else if (/^ *:-+ *$/.test(item.align[i])) {
948 item.align[i] = 'left';
950 item.align[i] = null;
954 for (i = 0; i < item.cells.length; i++) {
955 item.cells[i] = item.cells[i].split(/ *\| */);
958 this.tokens.push(item);
1015 // Get each top-level item.
1016 cap = cap[0].match(this.rules.item);
1023 item = cap[i];
1025 // Remove the list item's bullet
1027 space = item.length;
1028 item = item.replace(/^ *([*+-]|\d+\.) +/, '');
1031 // list item contains. Hacky.
1032 if (~item.indexOf('\n ')) {
1033 space -= item.length;
1034 item = !this.options.pedantic
1035 ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
1036 : item.replace(/^ {1,4}/gm, '');
1039 // Determine whether the next list item belongs here.
1049 // Determine whether item is loose or not.
1052 loose = next || /\n\n(?!\s*$)/.test(item);
1054 next = item.charAt(item.length - 1) === '\n';
1065 this.token(item, false, bq);
1106 item = {
1113 for (i = 0; i < item.align.length; i++) {
1114 if (/^ *-+: *$/.test(item.align[i])) {
1115 item.align[i] = 'right';
1116 } else if (/^ *:-+: *$/.test(item.align[i])) {
1117 item.align[i] = 'center';
1118 } else if (/^ *:-+ *$/.test(item.align[i])) {
1119 item.align[i] = 'left';
1121 item.align[i] = null;
1125 for (i = 0; i < item.cells.length; i++) {
1126 item.cells[i] = item.cells[i]
1131 this.tokens.push(item);
2978 * list item.
2981 * HTMLOListElement, and each line is moved into a separate list item.
4135 * Retrieves the selected item(s).
4137 * @returns Returns the selected item(s). If the multi property is true,
4139 * the selected item or undefined if there is no selection.
4145 * Indicates if a given item is selected.
4147 * @param {any} item The item whose selection state should be checked.
4148 * @returns Returns true if `item` is selected.
4150 isSelected: function(item) {
4151 return this.selection.indexOf(item) >= 0;
4153 setItemSelected: function(item, isSelected) {
4154 if (item !== undefined && item !== null) {
4156 this.selection.push(item);
4158 var i = this.selection.indexOf(item);
4163 this.fire("core-select", {isSelected: isSelected, item: item});
4167 * Set the selection state for a given `item`. If the multi property
4168 * is true, then the selected state of `item` will be toggled; otherwise
4169 * the `item` will be selected.
4171 * @param {any} item: The item to select.
4173 select: function(item) {
4175 this.toggle(item);
4176 } else if (this.getSelection() !== item) {
4178 this.setItemSelected(item, true);
4182 * Toggles the selection state for `item`.
4184 * @param {any} item: The item to toggle.
4186 toggle: function(item) {
4187 this.setItemSelected(item, !this.isSelected(item));
4197 * of the item element.
4335 * The event that would be fired from the item element to indicate
4436 var item = (value === null || value === undefined) ?
4438 this.$.selection.select(item);
4457 // find an item with value == value and return it's index
4463 // if no item found, the value itself is probably the index
4474 if (detail.item) {
4475 this.applySelection(detail.item, detail.isSelected);
4479 applySelection: function(item, isSelected) {
4481 item.classList.toggle(this.selectedClass, isSelected);
4484 item[this.selectedProperty] = isSelected;
4486 if (this.selectedAttribute && item.setAttribute) {
4488 item.setAttribute(this.selectedAttribute, '');
4490 item.removeAttribute(this.selectedAttribute);
4500 var item = this.items[i];
4501 var s = this.valueForNode(item) || i;
4511 this.asyncFire('core-activate', {item: item});
4544 Polymer('core-item', {
4563 * Specifies the label for the menu item.