Build the proper message box

@param  {Object} item    Current object in the queue

@return {String}         An HTML string of the message box
179905
function (item) {
				var html    = "",
				    type    = item.type,
				    message = item.message,
				    css     = item.cssClass || "";

				html += "<div class=\"alertify-dialog\">";

				if (_alertify.buttonFocus === "none") html += "<a href=\"#\" id=\"alertify-noneFocus\" class=\"alertify-hidden\"></a>";

				if (type === "prompt") html += "<form id=\"alertify-form\">";

				html += "<article class=\"alertify-inner\">";
				html += dialogs.message.replace("{{message}}", message);

				if (type === "prompt") html += dialogs.input;

				html += dialogs.buttons.holder;
				html += "</article>";

				if (type === "prompt") html += "</form>";

				html += "<a id=\"alertify-resetFocus\" class=\"alertify-resetFocus\" href=\"#\">Reset Focus</a>";
				html += "</div>";

				switch (type) {
				case "confirm":
					html = html.replace("{{buttons}}", this.appendButtons(dialogs.buttons.cancel, dialogs.buttons.ok));
					html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
					break;
				case "prompt":
					html = html.replace("{{buttons}}", this.appendButtons(dialogs.buttons.cancel, dialogs.buttons.submit));
					html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
					break;
				case "alert":
					html = html.replace("{{buttons}}", dialogs.buttons.ok);
					html = html.replace("{{ok}}", this.labels.ok);
					break;
				default:
					break;
				}

				elDialog.className = "alertify alertify-" + type + " " + css;
				elCover.className  = "alertify-cover";
				return html;
			}
84133
def item text, mnem=nil, &block
      #$log.debug "YYYY inside M: menuitem text #{text}  "
      m =  MenuItem.new text, mnem, &block 
      add m
      return m
    end
389079
function () {
                var msg = [], tp;
                msg.push('## ' + this.$classpath + ' ## ');
                for (var k in this) {
                    if (this.hasOwnProperty(k)) {
                        tp = typeof(this[k]);
                        if (tp == 'object' || tp == 'function')
                            msg.push(k += ':[' + tp + ']');
                        else if (tp == 'string')
                            msg.push(k += ':"' + this[k] + '"');
                        else
                            msg.push(k += ':' + this[k]);
                    }
                }
                Aria.$window.alert(msg.join('\n'));
                msg = null;
            }
427484
protected function renderItemIcon($item)
    {
        $iconClass = ArrayHelper::getValue($item, 'icon');
        if ($iconClass !== null) {
            $class = [$this->iconClass];
            Html::addCssClass($class, $iconClass);
            return Html::tag('i', '', ['class' => $class]);
        } else {
            return '';
        }
    }
30921
function BoxSelector() {

        /**
         * ### BoxSelector.button
         *
         * The button that if pressed shows the items
         *
         * @see BoxSelector.ul
         */
        this.button = null;

        /**
         * ### BoxSelector.buttonText
         *
         * The text on the button
         *
         * @see BoxSelector.button
         */
        this.buttonText = '';

        /**
         * ### BoxSelector.items
         *
         * List of items to choose from
         */
        this.items = [];

        /**
         * ### BoxSelector.onclick
         *
         * A callback to call when an item from the list is clicked
         *
         * Callback is executed with the BoxSelector instance as context.
         *
         * Optional. If not specified, items won't be clickable.
         *
         * @see BoxSelector.items
         */
        this.onclick = null;

        /**
         * ### BoxSelector.getDescr
         *
         * A callback that renders an element into a text
         */
        this.getDescr = null;

        /**
         * ### BoxSelector.getId
         *
         * A callback that returns the id of an item
         *
         * Default: returns item.id.
         */
        this.getId = function(item) { return item.id; };

        /**
         * ### BoxSelector.ul
         *
         * The HTML UL element displaying the list of items
         *
         * @see BoxSelector.items
         */
        this.ul = null;
    }
1049888
function(item) {
            if(!item || !item.type || !item.element)
                return false;

            switch(item.type) {
                case 'milestone':
                    return (item.element.hasClass('timeline-milestone'));
                    break;
                case 'smallItem':
                    return (item.element.hasClass('timeline-smallitem'));
                    break;
                case 'bigItem':
                    return (item.element.hasClass('timeline-bigitem'));
                    break;
                default:
                    return false;
                    break;
            }
        }
1190151
function(msg) {
      var gameOverElement = document.getElementById('gameOver'),
          gameOverMsgElement = document.getElementById('gameOverMsg'),
          waitingForPlayerElem = document.getElementById('waitingForPlayer');
      if (msg === false)  {
        gameOverElement.style.display = 'none';
      }
      else {
        gameOverMsgElement.innerText = msg;
        gameOverElement.style.display = 'block';
        waitingForPlayerElem.style.display = 'none';
      }
    }
221261
private String getRole(final WMenuItem item) {
		if (!item.isSelectAllowed()) {
			return null;
		}
		MenuSelectContainer selectContainer = WebUtilities.getAncestorOfClass(MenuSelectContainer.class, item);
		if (selectContainer == null) {
			return CHECKBOX_ROLE;
		}
		return MenuSelectContainer.SelectionMode.MULTIPLE.equals(selectContainer.getSelectionMode()) ? CHECKBOX_ROLE : RADIO_ROLE;
	}
398861
function queue_item(queueNumber, customParams, callback) {
      var _doArgs49 = doArgs(arguments, ['string|number', ['object', {}], 'function']);

      var _doArgs50 = _slicedToArray(_doArgs49, 3);

      queueNumber = _doArgs50[0];
      customParams = _doArgs50[1];
      callback = _doArgs50[2];


      doRequest({
        urlPattern: [QUEUE_ITEM, queueNumber]
      }, customParams, callback);
    }
111568
function(data){
    if (data === undefined) {
      data = '';
    }
    $('#message-bar').removeClass('message-success');
    $('#message-bar').addClass('message-fail');

    var val = $('#message-bar').html(data);

    if (this.options.onFailure) {
      this.options.onFailure(data);
    }

    return val;
  }
195342
public String htmlItem(CmsListItem item, boolean odd, boolean isPrintable) {

        StringBuffer html = new StringBuffer(1024);
        html.append("<tr ");
        if (!isPrintable) {
            html.append("class='");
            html.append(odd ? "oddrowbg" : (getWp().useNewStyle() ? "evenrowbg" : "evenrowbgnew"));
            html.append("'");
        }
        html.append(">\n");
        Iterator<CmsListColumnDefinition> itCols = m_columns.elementList().iterator();
        int width = 0;
        while (itCols.hasNext()) {
            CmsListColumnDefinition col = itCols.next();
            if (!col.isVisible() && !isPrintable) {
                continue;
            }
            if (!col.isPrintable() && isPrintable) {
                continue;
            }
            width++;
            StringBuffer style = new StringBuffer(64);
            html.append("<td");
            CmsListColumnAlignEnum align = col.getAlign();
            if ((align != CmsListColumnAlignEnum.ALIGN_LEFT) && CmsStringUtil.isNotEmpty(align.toString())) {
                style.append("text-align: ");
                style.append(col.getAlign());
                style.append("; ");
            }
            if (col.isTextWrapping()) {
                style.append("white-space: normal;");
            }
            if (isPrintable) {
                style.append("border-top: 1px solid black;");
            }
            if (style.length() > 0) {
                html.append(" style='");
                html.append(style);
                html.append("'");
            }
            html.append(">\n");
            html.append(col.htmlCell(item, isPrintable));
            html.append("</td>\n");
        }
        if (!isPrintable && hasCheckMultiActions()) {
            width++;
            html.append("\t<td class='select' style='text-align: center'>\n");
            html.append("\t\t<input type='checkbox' class='checkbox' name='listMultiAction' value='");
            html.append(item.getId());
            html.append("'>\n");
            html.append("\t</td>\n");
        }
        html.append("</tr>\n");

        Iterator<CmsListItemDetails> itDet = m_itemDetails.elementList().iterator();
        while (itDet.hasNext()) {
            CmsListItemDetails lid = itDet.next();
            if (!lid.isVisible() && !isPrintable) {
                continue;
            }
            if (!lid.isPrintable() && isPrintable) {
                continue;
            }
            if ((item.get(lid.getId()) != null)
                && CmsStringUtil.isNotEmptyOrWhitespaceOnly(item.get(lid.getId()).toString())) {
                int padCols = 0;
                itCols = m_columns.elementList().iterator();
                while (itCols.hasNext()) {
                    CmsListColumnDefinition col = itCols.next();
                    if (col.getId().equals(lid.getAtColumn())) {
                        break;
                    }
                    if (!col.isVisible() && !isPrintable) {
                        continue;
                    }
                    if (!col.isPrintable() && isPrintable) {
                        continue;
                    }
                    padCols++;
                }
                int spanCols = width - padCols;

                html.append("<tr ");
                if (!isPrintable) {
                    html.append("class='");
                    html.append(odd ? "oddrowbg" : (getWp().useNewStyle() ? "evenrowbg" : "evenrowbgnew"));
                    html.append("'");
                }
                html.append(">\n");
                if (padCols > 0) {
                    html.append("<td colspan='");
                    html.append(padCols);
                    html.append("'>&nbsp;</td>\n");
                }
                html.append("<td colspan='");
                html.append(spanCols);
                html.append("' style='padding-left: 20px; white-space:normal;'>\n");
                html.append(lid.htmlCell(item, isPrintable));
                html.append("\n</td>\n");
                html.append("\n");
                html.append("</tr>\n");
            }
        }
        return html.toString();
    }
240821
function(item) {

      if (this.maxItems && this.items.length >= this.maxItems){
				this.maxItemsAlert ? this.maxItemsAlert.call() : alert("You're limited to "+this.maxItems+" items");
			  return;	
			}
			
      var label = (typeof item == "object") ? item.label : item	;
      var li = inputEx.cn('li', {className: 'inputEx-DDList-item'});
      var span = inputEx.cn('span', null, null, label)

      if(this.listSelectOptions){
        var select = new inputEx.SelectField(this.listSelectOptions); 
        this.selects.push(select);
        li.appendChild(select.el);
        item.getValue = function(){
				  return {select: select.getValue(), label: this.label, value: this.value};
				}
				item.setValue = function(obj){
				  span.innerHTML = obj.label;
				  this.label = obj.label;
				  this.value = obj.value;
				  select.setValue(obj.select);
				}
		  } else {
			  item.getValue = function(){
					result = {};
					if(this.value) result.value = this.value;
					if(this.label) result.label = this.label;
					return result;
				}				
			  item.setValue = function(obj){
				  span.innerHTML = obj.label;
				  this.label = obj.label;
				  this.value = obj.value;
				}
			}
      li.appendChild(span);
 

      // Option for the "remove" link (default: true)
		if(!!this.options.allowDelete){
			var removeLink = inputEx.cn('div', {className:"removeButton"}, null, ""); 
	      li.appendChild( removeLink );
	      Event.addListener(removeLink, 'click', function(e) {
	         var a = Event.getTarget(e);
	         var li = a.parentNode;
	         this.removeItem( inputEx.indexOf(li,this.ul.childNodes) );
	      }, this, true);
      }
      // Don't want any drag and drop
      //var dditem = new inputEx.widget.DDListItem(li);
      //
      
      this.items.push( item );

      this.ul.appendChild(li);
   }
54277
function write (item) {

  var filename = item.file;
  var message = item.message;
  var header = item.header;
  var file = path.join(p_, filename);

  fs.exists(file, function (exists) {
    if (exists) {
      fs.appendFile(file, message, function () {
        task();
      });

    } else {
      if (header) {
        message = header + EOL + message;
      }

      var dir = path.dirname(file);
      fs.exists(dir, function (exists) {
        if (exists) {
          fs.appendFile(file, message, function () {
            task();
          });

        } else {
          fs.mkdirs(dir, function (err) {
            if (err) {
              console.error(err);
              task();
            } else {
              fs.appendFile(file, message, function () {
                task();
              });
            }
          });
        }
      });
    }
  });
}
343513
function(item) {
  var result;

  if (_.isArray(item)) {
    result = [];
    _.each(item, function(value) {
      result.push(parseItem(value));
    });
    return result;
  }

  /* otherwise */
  if (_.isObject(item)) {
    return parseObject(item);
  }

  /* otherwise -- just a normal (non-compound) item */
  return item;
}
1145390
def btnstate(self, item= None):
        
        if not self.canvas.editing():
            return

        item = self.currentItem()
        if not item: # If not selected Item, take the first one
            item = self.labelList.item(self.labelList.count()-1)

        difficult = self.diffcButton.isChecked()

        try:
            shape = self.itemsToShapes[item]
        except:
            pass
        # Checked and Update
        try:
            if difficult != shape.difficult:
                shape.difficult = difficult
                self.setDirty()
            else:  # User probably changed item visibility
                self.canvas.setShapeVisible(shape, item.checkState() == Qt.Checked)
        except:
            pass
185676
function ( item ) {  // function to obtain the URL of the thumbnail image
				var href;

				if (item.element) {
					href = $(item.element).find('img').attr('src');
				}

				if (!href && item.type === 'image' && item.href) {
					href = item.href;
				}

				return href;
			}
1236215
function processItem(params) {
          var nestedMenu = extractNestedMenu(params);

          // if html property is not defined, fallback to text, otherwise use default text
          // if first item in the item array is a function then invoke .call()
          // if first item is a string, then text should be the string.

          var text = DEFAULT_ITEM_TEXT;
          var currItemParam = angular.extend({}, params);
          var item = params.item;
          var enabled = item.enabled === undefined ? item[2] : item.enabled;

          currItemParam.nestedMenu = nestedMenu;
          currItemParam.enabled = resolveBoolOrFunc(enabled, params);
          currItemParam.text = createAndAddOptionText(currItemParam);

          registerCurrentItemEvents(currItemParam);

        }