Skip to content

Instantly share code, notes, and snippets.

View mteichtahl's full-sized avatar

Marc Teichtahl mteichtahl

View GitHub Profile
this.$palettes.on('hidden.bs.collapse', function (e) {
var $this = $(this),
$target = $(e.target),
targetPage = $target.attr('id').slice(0, -6);
var $i = $("span[itemprop=expandCollapseIcons] i", $(targetPage + "-panel"));
if ($i.hasClass('icon-chevron-down')) {
$i.removeClass('icon-chevron-down').addClass('icon-chevron-up');
} else {
$i.removeClass('icon-chevron-up').addClass('icon-chevron-down');
this.$palettes.on('hidden.bs.collapse', function (e) {
var $this = $(this),
$target = $(e.target);
var $span = $("span[itemprop=expandCollapseIcons]");
var $i = $("span[itemprop=expandCollapseIcons] i");
// It's the $i who has class "icon-chevron-down" so
if ($i.hasClass('icon-chevron-down')) {
<?php
/**
* # About Panel Widget View
*
* Displays the about panel in the designer palette.
*
* @var App $model the model the widget is for
* @var ActiveForm $form the form containing this view
* @var AboutFeature $feature the feature instance
* @var AboutPanelWidget $this the widget rendering the view
initializePalettes: function () {
this.$preview = $(".app-preview");
this.$palette = $("#app-palette");
this.$stylePalette = $("#style-palette");
this.$palettes = $("#app-palette,#style-palette");
this.$pageMarker = $("#currentPage");
this.id = this.$palette.data('id');
public function filters()
{
$filters = array();
return array_merge($filters,parent::filters());
}
/**
* @return array default filters rules
*/
public function filters()
{
// This will cause the filter to be run on all actions
return array(
'allowCrossOriginFilter'
);
}