/*
Require this overwrite to show bootstrap sort icons
327512
protected function renderHeaderCellContent()
    {
        if(yii::app()->editable->form != EditableConfig::FORM_BOOTSTRAP) {
            parent::renderHeaderCellContent();
            return;
        }
        
        if ($this->grid->enableSorting && $this->sortable && $this->name !== null)
        {
            $sort = $this->grid->dataProvider->getSort();
            $label = isset($this->header) ? $this->header : $sort->resolveLabel($this->name);

            if ($sort->resolveAttribute($this->name) !== false)
                $label .= '<span class="caret"></span>';

            echo $sort->link($this->name, $label, array('class'=>'sort-link'));
        }
        else
        {
            if ($this->name !== null && $this->header === null)
            {
                if ($this->grid->dataProvider instanceof CActiveDataProvider)
                    echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name));
                else
                    echo CHtml::encode($this->name);
            }
            else
                parent::renderHeaderCellContent();
        }
    }
89622
function iconLookup(filename) {
  var ext = extname(filename);

  // try by extension
  if (icons[ext]) {
    return {
      className: 'icon-' + ext.substring(1),
      fileName: icons[ext]
    };
  }

  var mimetype = mime.lookup(ext);

  // default if no mime type
  if (mimetype === false) {
    return {
      className: 'icon-default',
      fileName: icons.default
    };
  }

  // try by mime type
  if (icons[mimetype]) {
    return {
      className: 'icon-' + mimetype.replace('/', '-'),
      fileName: icons[mimetype]
    };
  }

  var suffix = mimetype.split('+')[1];

  if (suffix && icons['+' + suffix]) {
    return {
      className: 'icon-' + suffix,
      fileName: icons['+' + suffix]
    };
  }

  var type = mimetype.split('/')[0];

  // try by type only
  if (icons[type]) {
    return {
      className: 'icon-' + type,
      fileName: icons[type]
    };
  }

  return {
    className: 'icon-default',
    fileName: icons.default
  };
}
819775
@Override
	protected Icon getIcon(JTable table, int column) {
		SortKey sortKey = getSortKey(table, column);
		if (sortKey != null && table.convertColumnIndexToView(sortKey.getColumn()) == column) {
			SortOrder sortOrder = sortKey.getSortOrder();
			switch (sortOrder) {
			case ASCENDING:
				return VerticalSortIcon.ASCENDING;
			case DESCENDING:
				return VerticalSortIcon.DESCENDING;
			case UNSORTED:
				return VerticalSortIcon.ASCENDING;
			}
		}
		return null;
	}
392416
function(sortOptions) {
        var className;

        if (this._$currentSortBtn) {
            this._$currentSortBtn.removeClass(classNameConst.BTN_SORT_DOWN + ' ' + classNameConst.BTN_SORT_UP);
        }
        this._$currentSortBtn = this.$el.find(
            'th[' + ATTR_COLUMN_NAME + '="' + sortOptions.columnName + '"] a.' + classNameConst.BTN_SORT
        );

        className = sortOptions.ascending ? classNameConst.BTN_SORT_UP : classNameConst.BTN_SORT_DOWN;

        this._$currentSortBtn.addClass(className);
    }
242604
function (iconInfo, active) {
            // TODO: mutualize with the icon widget
            var style = ['padding:0;display:inline-block;background-position:-', iconInfo.iconLeft, 'px -',
                    iconInfo.iconTop, 'px;width:', iconInfo.width, 'px;height:', iconInfo.height,
                    'px;vertical-align: top;'];
            if (active) {
                style.push('cursor:pointer;');
            }
            return style.join('');
        }
109883
function buildIconsObject(svgFiles, getSvg) {
  return svgFiles
    .map(svgFile => {
      const name = path.basename(svgFile, '.svg');
      const svg = getSvg(svgFile);
      const contents = getSvgContents(svg);
      return { name, contents };
    })
    .reduce((icons, icon) => {
      icons[icon.name] = icon.contents;
      return icons;
    }, {});
}
461068
function (skinObject, hideIconNames) {
            // normalize the skin:
            if (skinObject.iconsLeft == null || skinObject.iconsLeft === "") {
                skinObject.iconsLeft = [];
            } else if (ariaUtilsType.isString(skinObject.iconsLeft)) {
                skinObject.iconsLeft = skinObject.iconsLeft.split(',');
            }
            if (skinObject.iconsRight == null || skinObject.iconsRight === "") {
                skinObject.iconsRight = [];
            } else if (ariaUtilsType.isString(skinObject.iconsRight)) {
                skinObject.iconsRight = skinObject.iconsRight.split(',');
            }

            var iconsLeft = this._filterIcons(skinObject.iconsLeft, hideIconNames);
            var iconsRight = this._filterIcons(skinObject.iconsRight, hideIconNames);

            return {
                iconsLeft : iconsLeft,
                iconsRight : iconsRight,
                hasIcons : iconsLeft.length > 0 || iconsRight.length > 0
            };
        }
1285148
function useIconProviders(data, $element) {
        _iconProviders.forEach(function (provider) {
            var icon = provider(data);
            if (icon) {
                $element.prepend($(icon));
            }
        });
    }
103638
function load(icon) {
  if (cache[icon]) return cache[icon];
  return cache[icon] = fs.readFileSync(__dirname + '/public/icons/' + icon, 'base64');
}
789527
public function applySort()
    {
        parent::applySort();

        if ($this->getSortBy() && $this->itemCreate) {
            //Remove previous click handler to Add new Item button and attach new one using sort argument.
            $this->container->js(true, $this->itemCreate->js()->off('click.atk_CRUD'));
            $this->container->js(true,
                                 $this->itemCreate->js()->on('click.atk_CRUD',
                                 new jsFunction([
                                     new jsModal('Add new', $this->pageCreate, [$this->name.'_sort' => $this->getSortBy()]),
                                 ]))
            );
        }
    }
20988
private function _getSortAnchor()
    {
        $result = '';

        /*
         * Plain Bootstrap with glyphicons
         */
        if ('resource-table::bootstrap' === $this->_viewName) {
            $result .= '<a href="'.$this->sortUrl().'" class="pull-right">';
            $glyphicon = 'glyphicon-sort';
            if ($this->sortActive()) {
                // Column is active - we can show proper icon
                $glyphicon = $this->sortDirection() === 'DESC' ? 'glyphicon-sort-by-attributes' : 'glyphicon-sort-by-attributes-alt';
            }
            $result .= '<i class="glyphicon '.$glyphicon.'"></i>';
            $result .= '</a>';
        }

        /*
         * Just simple table
         */
        if (!$result) {
            $result .= '<a href="'.$this->sortUrl().'" style="font-weight:'.($this->sortActive() ? 'bold' : 'normal').'">';
            $result .= $this->sortDirection() === 'DESC' ? '&#8595;' : '&#8593;';
            $result .= '</a>';
        }

        return $result;
    }
702001
function (out) {
            var cfg = this._cfg, cssPrefix = this._cssPrefix; // sclass = cfg.sclass
            out.write(['</span></td>', '<td class="', cssPrefix, 'rs ', cssPrefix, 'bkgC"></td>', '</tr>', '<tr>',
                    '<td class="', cssPrefix, 'blc ', cssPrefix, 'bkgA"></td>', '<td class="', cssPrefix, 'bs ',
                    cssPrefix, 'bkgB">', this.__addFrameIcon(cfg, cssPrefix, 'bottom'), '</td>', '<td class="',
                    cssPrefix, 'brc ', cssPrefix, 'bkgA"></td>', '</tr>', '</tbody></table>'].join(''));

        }
350636
function(items) {

			var itemMarkup = '', i;
			for (i=0; i< items.length; i++) {
				itemMarkup += '<li><a href="#" data-value="' + items[i] + '">' + this.highlighter(items[i]) + '</a></li>';
			}

			var inputRegion = this.node.region();

			this.menu.setHtml(itemMarkup)
			this.menu.one('li').addClass('active')

			this.menu.setStyles({
				left: inputRegion.left,
				top: inputRegion.bottom,
				display:'block'
			});

			this.node.fire('typeahead:show')

			return this;
		}
604989
function(options) {
        this.originHTML = this.$main.html();

        this.$main.addClass([defaultClass, options.customClass, prefix + options.theme].join(' '));

        if (options.size === 'large') {
            this.$main.addClass(largeClass);
        }

        if (options.text) {
            this.$main.html(options.text);
        }

        if (options.icon) {
            var iconName = !document.documentMode ? options.icon : window.bizui.codepoints[options.icon];
            this.$main.prepend('<i class="biz-icon">' + iconName + '</i> ');
        }

        if (options.disabled) {
            this.disable();
        }
    }
369435
function (draggedItem, sortable) {
        var ditem = draggedItem;
        if (store(sortable).getConfig('copy') === true) {
            ditem = draggedItem.cloneNode(true);
            addAttribute(ditem, 'aria-copied', 'true');
            draggedItem.parentElement.appendChild(ditem);
            ditem.style.display = 'none';
            ditem.oldDisplay = draggedItem.style.display;
        }
        return ditem;
    }
993541
function() {
      var t = this,
          isEditMode = t.$el.hasClass('edit-mode'),
          text = isEditMode ? 'Lock Components' : 'Edit Components',
          icon = isEditMode ? 'lock' : 'edit';
      t.$('.nm-pvm-lock').text(text);
      t.$('.nm-pvm-edit i').attr('class', 'icon-' + icon);
    }
913452
function(rm, oRoadMap, oStep){
		var fCreateIcon = function(rm, oRoadMap, sId, sIcon, sAdditonalClass){
			rm.write("<div");
			rm.writeAttribute("id", sId + "-ico");
			rm.addClass("sapUiRoadMapStepIco");
			if (sAdditonalClass) {
				rm.addClass(sAdditonalClass);
			}
			rm.writeClasses();
			rm.write("></div>");
		};

		var bIsExpanded = oStep.getExpanded();

		//Render the start step with an additional icon
		renderStep(rm, oRoadMap, oStep, bIsExpanded ? ["sapUiRoadMapExpanded"] : null, function(rm, oRoadMap, oStep){
			fCreateIcon(rm, oRoadMap, oStep.getId(), bIsExpanded ? "roundtripstart.gif" : "roundtrip.gif");
		});

		//Render the sub steps
		var aSteps = oStep.getSubSteps();
		for (var i = 0; i < aSteps.length; i++) {
			var aClasses = ["sapUiRoadMapSubStep"];
			if (!bIsExpanded && aSteps[i].getVisible()) {
				aClasses.push("sapUiRoadMapHidden");
			}
			renderStep(rm, oRoadMap, aSteps[i], aClasses);
		}

		//Render the end step with an additional icon
		aClasses = ["sapUiRoadMapExpanded", "sapUiRoadMapStepEnd"];
		if (!bIsExpanded) {
			aClasses.push("sapUiRoadMapHidden");
		}
		renderStep(rm, oRoadMap, oStep, aClasses, function(rm, oRoadMap, oStep){
			fCreateIcon(rm, oRoadMap, oStep.getId() + "-expandend", "roundtripend.gif");
		}, oStep.getId() + "-expandend");
	}