This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function setSegments($segments) | |
{ | |
$mandango = $this->getMandango(); | |
$segments = array_map(function($name) use ($mandango) { | |
return $mandango->create('Model\Intervention\InterventionSetSegment')->setName($name); | |
}, $segments); | |
$segmentGroup = parent::getSegments(); | |
$segmentGroup->remove($segmentGroup->all()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Limits the number of characters in a textarea and displays characters remaining | |
// Accepts a jQuery element statusElem which displays how many characters are remaining | |
$.fn.textLimiter = function(statusElem, length) { | |
return this.each(function() { | |
var input = $(this); | |
var visible = true; | |
var initial = statusElem.text(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.outerHtml = function() { | |
if (this.length == 0) return false; | |
var elem = this[0], name = elem.tagName.toLowerCase(); | |
if (elem.outerHTML) return elem.outerHTML; | |
var attrs = $.map(elem.attributes, function(i) { return i.name+'="'+i.value+'"'; }); | |
return "<"+name+(attrs.length > 0 ? " "+attrs.join(" ") : "")+">"+elem.innerHTML+"</"+name+">"; | |
}; | |
})(jQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.showFilter = function(selectors, criteria, options) { | |
this.data("lastVal", this.val()); | |
var id = 1; | |
while($(".showFilter"+id).length > 0) id++; | |
this.addClass(".showFilter"+id); | |
var input = this; | |
var filterInput = function(input) { return $.trim(input).toLowerCase().replace(/\s+/, " ") } | |
var test = function() { | |
var c = criteria($(this)); |
NewerOlder