You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by le...@apache.org on 2017/01/18 18:03:30 UTC
[06/51] [partial] incubator-senssoft git commit: Push site to top
level and create new branch
http://git-wip-us.apache.org/repos/asf/incubator-senssoft/blob/855d3ab1/semantic/dist/components/search.js
----------------------------------------------------------------------
diff --git a/semantic/dist/components/search.js b/semantic/dist/components/search.js
new file mode 100644
index 0000000..68627e9
--- /dev/null
+++ b/semantic/dist/components/search.js
@@ -0,0 +1,1407 @@
+/*!
+ * # Semantic UI 2.2.6 - Search
+ * http://github.com/semantic-org/semantic-ui/
+ *
+ *
+ * Released under the MIT license
+ * http://opensource.org/licenses/MIT
+ *
+ */
+
+;(function ($, window, document, undefined) {
+
+"use strict";
+
+window = (typeof window != 'undefined' && window.Math == Math)
+ ? window
+ : (typeof self != 'undefined' && self.Math == Math)
+ ? self
+ : Function('return this')()
+;
+
+$.fn.search = function(parameters) {
+ var
+ $allModules = $(this),
+ moduleSelector = $allModules.selector || '',
+
+ time = new Date().getTime(),
+ performance = [],
+
+ query = arguments[0],
+ methodInvoked = (typeof query == 'string'),
+ queryArguments = [].slice.call(arguments, 1),
+ returnedValue
+ ;
+ $(this)
+ .each(function() {
+ var
+ settings = ( $.isPlainObject(parameters) )
+ ? $.extend(true, {}, $.fn.search.settings, parameters)
+ : $.extend({}, $.fn.search.settings),
+
+ className = settings.className,
+ metadata = settings.metadata,
+ regExp = settings.regExp,
+ fields = settings.fields,
+ selector = settings.selector,
+ error = settings.error,
+ namespace = settings.namespace,
+
+ eventNamespace = '.' + namespace,
+ moduleNamespace = namespace + '-module',
+
+ $module = $(this),
+ $prompt = $module.find(selector.prompt),
+ $searchButton = $module.find(selector.searchButton),
+ $results = $module.find(selector.results),
+ $result = $module.find(selector.result),
+ $category = $module.find(selector.category),
+
+ element = this,
+ instance = $module.data(moduleNamespace),
+
+ disabledBubbled = false,
+
+ module
+ ;
+
+ module = {
+
+ initialize: function() {
+ module.verbose('Initializing module');
+ module.determine.searchFields();
+ module.bind.events();
+ module.set.type();
+ module.create.results();
+ module.instantiate();
+ },
+ instantiate: function() {
+ module.verbose('Storing instance of module', module);
+ instance = module;
+ $module
+ .data(moduleNamespace, module)
+ ;
+ },
+ destroy: function() {
+ module.verbose('Destroying instance');
+ $module
+ .off(eventNamespace)
+ .removeData(moduleNamespace)
+ ;
+ },
+
+ refresh: function() {
+ module.debug('Refreshing selector cache');
+ $prompt = $module.find(selector.prompt);
+ $searchButton = $module.find(selector.searchButton);
+ $category = $module.find(selector.category);
+ $results = $module.find(selector.results);
+ $result = $module.find(selector.result);
+ },
+
+ refreshResults: function() {
+ $results = $module.find(selector.results);
+ $result = $module.find(selector.result);
+ },
+
+ bind: {
+ events: function() {
+ module.verbose('Binding events to search');
+ if(settings.automatic) {
+ $module
+ .on(module.get.inputEvent() + eventNamespace, selector.prompt, module.event.input)
+ ;
+ $prompt
+ .attr('autocomplete', 'off')
+ ;
+ }
+ $module
+ // prompt
+ .on('focus' + eventNamespace, selector.prompt, module.event.focus)
+ .on('blur' + eventNamespace, selector.prompt, module.event.blur)
+ .on('keydown' + eventNamespace, selector.prompt, module.handleKeyboard)
+ // search button
+ .on('click' + eventNamespace, selector.searchButton, module.query)
+ // results
+ .on('mousedown' + eventNamespace, selector.results, module.event.result.mousedown)
+ .on('mouseup' + eventNamespace, selector.results, module.event.result.mouseup)
+ .on('click' + eventNamespace, selector.result, module.event.result.click)
+ ;
+ }
+ },
+
+ determine: {
+ searchFields: function() {
+ // this makes sure $.extend does not add specified search fields to default fields
+ // this is the only setting which should not extend defaults
+ if(parameters && parameters.searchFields !== undefined) {
+ settings.searchFields = parameters.searchFields;
+ }
+ }
+ },
+
+ event: {
+ input: function() {
+ clearTimeout(module.timer);
+ module.timer = setTimeout(module.query, settings.searchDelay);
+ },
+ focus: function() {
+ module.set.focus();
+ if( module.has.minimumCharacters() ) {
+ module.query();
+ if( module.can.show() ) {
+ module.showResults();
+ }
+ }
+ },
+ blur: function(event) {
+ var
+ pageLostFocus = (document.activeElement === this),
+ callback = function() {
+ module.cancel.query();
+ module.remove.focus();
+ module.timer = setTimeout(module.hideResults, settings.hideDelay);
+ }
+ ;
+ if(pageLostFocus) {
+ return;
+ }
+ if(module.resultsClicked) {
+ module.debug('Determining if user action caused search to close');
+ $module
+ .one('click.close' + eventNamespace, selector.results, function(event) {
+ if(module.is.inMessage(event) || disabledBubbled) {
+ $prompt.focus();
+ return;
+ }
+ disabledBubbled = false;
+ if( !module.is.animating() && !module.is.hidden()) {
+ callback();
+ }
+ })
+ ;
+ }
+ else {
+ module.debug('Input blurred without user action, closing results');
+ callback();
+ }
+ },
+ result: {
+ mousedown: function() {
+ module.resultsClicked = true;
+ },
+ mouseup: function() {
+ module.resultsClicked = false;
+ },
+ click: function(event) {
+ module.debug('Search result selected');
+ var
+ $result = $(this),
+ $title = $result.find(selector.title).eq(0),
+ $link = $result.is('a[href]')
+ ? $result
+ : $result.find('a[href]').eq(0),
+ href = $link.attr('href') || false,
+ target = $link.attr('target') || false,
+ title = $title.html(),
+ // title is used for result lookup
+ value = ($title.length > 0)
+ ? $title.text()
+ : false,
+ results = module.get.results(),
+ result = $result.data(metadata.result) || module.get.result(value, results),
+ returnedValue
+ ;
+ if( $.isFunction(settings.onSelect) ) {
+ if(settings.onSelect.call(element, result, results) === false) {
+ module.debug('Custom onSelect callback cancelled default select action');
+ disabledBubbled = true;
+ return;
+ }
+ }
+ module.hideResults();
+ if(value) {
+ module.set.value(value);
+ }
+ if(href) {
+ module.verbose('Opening search link found in result', $link);
+ if(target == '_blank' || event.ctrlKey) {
+ window.open(href);
+ }
+ else {
+ window.location.href = (href);
+ }
+ }
+ }
+ }
+ },
+ handleKeyboard: function(event) {
+ var
+ // force selector refresh
+ $result = $module.find(selector.result),
+ $category = $module.find(selector.category),
+ $activeResult = $result.filter('.' + className.active),
+ currentIndex = $result.index( $activeResult ),
+ resultSize = $result.length,
+ hasActiveResult = $activeResult.length > 0,
+
+ keyCode = event.which,
+ keys = {
+ backspace : 8,
+ enter : 13,
+ escape : 27,
+ upArrow : 38,
+ downArrow : 40
+ },
+ newIndex
+ ;
+ // search shortcuts
+ if(keyCode == keys.escape) {
+ module.verbose('Escape key pressed, blurring search field');
+ module.trigger.blur();
+ }
+ if( module.is.visible() ) {
+ if(keyCode == keys.enter) {
+ module.verbose('Enter key pressed, selecting active result');
+ if( $result.filter('.' + className.active).length > 0 ) {
+ module.event.result.click.call($result.filter('.' + className.active), event);
+ event.preventDefault();
+ return false;
+ }
+ }
+ else if(keyCode == keys.upArrow && hasActiveResult) {
+ module.verbose('Up key pressed, changing active result');
+ newIndex = (currentIndex - 1 < 0)
+ ? currentIndex
+ : currentIndex - 1
+ ;
+ $category
+ .removeClass(className.active)
+ ;
+ $result
+ .removeClass(className.active)
+ .eq(newIndex)
+ .addClass(className.active)
+ .closest($category)
+ .addClass(className.active)
+ ;
+ event.preventDefault();
+ }
+ else if(keyCode == keys.downArrow) {
+ module.verbose('Down key pressed, changing active result');
+ newIndex = (currentIndex + 1 >= resultSize)
+ ? currentIndex
+ : currentIndex + 1
+ ;
+ $category
+ .removeClass(className.active)
+ ;
+ $result
+ .removeClass(className.active)
+ .eq(newIndex)
+ .addClass(className.active)
+ .closest($category)
+ .addClass(className.active)
+ ;
+ event.preventDefault();
+ }
+ }
+ else {
+ // query shortcuts
+ if(keyCode == keys.enter) {
+ module.verbose('Enter key pressed, executing query');
+ module.query();
+ module.set.buttonPressed();
+ $prompt.one('keyup', module.remove.buttonFocus);
+ }
+ }
+ },
+
+ setup: {
+ api: function(searchTerm) {
+ var
+ apiSettings = {
+ debug : settings.debug,
+ on : false,
+ cache : true,
+ action : 'search',
+ urlData : {
+ query : searchTerm
+ },
+ onSuccess : function(response) {
+ module.parse.response.call(element, response, searchTerm);
+ },
+ onAbort : function(response) {
+ },
+ onFailure : function() {
+ module.displayMessage(error.serverError);
+ },
+ onError : module.error
+ },
+ searchHTML
+ ;
+ $.extend(true, apiSettings, settings.apiSettings);
+ module.verbose('Setting up API request', apiSettings);
+ $module.api(apiSettings);
+ }
+ },
+
+ can: {
+ useAPI: function() {
+ return $.fn.api !== undefined;
+ },
+ show: function() {
+ return module.is.focused() && !module.is.visible() && !module.is.empty();
+ },
+ transition: function() {
+ return settings.transition && $.fn.transition !== undefined && $module.transition('is supported');
+ }
+ },
+
+ is: {
+ animating: function() {
+ return $results.hasClass(className.animating);
+ },
+ hidden: function() {
+ return $results.hasClass(className.hidden);
+ },
+ inMessage: function(event) {
+ if(!event.target) {
+ return;
+ }
+ var
+ $target = $(event.target),
+ isInDOM = $.contains(document.documentElement, event.target)
+ ;
+ return (isInDOM && $target.closest(selector.message).length > 0);
+ },
+ empty: function() {
+ return ($results.html() === '');
+ },
+ visible: function() {
+ return ($results.filter(':visible').length > 0);
+ },
+ focused: function() {
+ return ($prompt.filter(':focus').length > 0);
+ }
+ },
+
+ trigger: {
+ blur: function() {
+ var
+ events = document.createEvent('HTMLEvents'),
+ promptElement = $prompt[0]
+ ;
+ if(promptElement) {
+ module.verbose('Triggering native blur event');
+ events.initEvent('blur', false, false);
+ promptElement.dispatchEvent(events);
+ }
+ }
+ },
+
+ get: {
+ inputEvent: function() {
+ var
+ prompt = $prompt[0],
+ inputEvent = (prompt !== undefined && prompt.oninput !== undefined)
+ ? 'input'
+ : (prompt !== undefined && prompt.onpropertychange !== undefined)
+ ? 'propertychange'
+ : 'keyup'
+ ;
+ return inputEvent;
+ },
+ value: function() {
+ return $prompt.val();
+ },
+ results: function() {
+ var
+ results = $module.data(metadata.results)
+ ;
+ return results;
+ },
+ result: function(value, results) {
+ var
+ lookupFields = ['title', 'id'],
+ result = false
+ ;
+ value = (value !== undefined)
+ ? value
+ : module.get.value()
+ ;
+ results = (results !== undefined)
+ ? results
+ : module.get.results()
+ ;
+ if(settings.type === 'category') {
+ module.debug('Finding result that matches', value);
+ $.each(results, function(index, category) {
+ if($.isArray(category.results)) {
+ result = module.search.object(value, category.results, lookupFields)[0];
+ // don't continue searching if a result is found
+ if(result) {
+ return false;
+ }
+ }
+ });
+ }
+ else {
+ module.debug('Finding result in results object', value);
+ result = module.search.object(value, results, lookupFields)[0];
+ }
+ return result || false;
+ },
+ },
+
+ select: {
+ firstResult: function() {
+ module.verbose('Selecting first result');
+ $result.first().addClass(className.active);
+ }
+ },
+
+ set: {
+ focus: function() {
+ $module.addClass(className.focus);
+ },
+ loading: function() {
+ $module.addClass(className.loading);
+ },
+ value: function(value) {
+ module.verbose('Setting search input value', value);
+ $prompt
+ .val(value)
+ ;
+ },
+ type: function(type) {
+ type = type || settings.type;
+ if(settings.type == 'category') {
+ $module.addClass(settings.type);
+ }
+ },
+ buttonPressed: function() {
+ $searchButton.addClass(className.pressed);
+ }
+ },
+
+ remove: {
+ loading: function() {
+ $module.removeClass(className.loading);
+ },
+ focus: function() {
+ $module.removeClass(className.focus);
+ },
+ buttonPressed: function() {
+ $searchButton.removeClass(className.pressed);
+ }
+ },
+
+ query: function() {
+ var
+ searchTerm = module.get.value(),
+ cache = module.read.cache(searchTerm)
+ ;
+ if( module.has.minimumCharacters() ) {
+ if(cache) {
+ module.debug('Reading result from cache', searchTerm);
+ module.save.results(cache.results);
+ module.addResults(cache.html);
+ module.inject.id(cache.results);
+ }
+ else {
+ module.debug('Querying for', searchTerm);
+ if($.isPlainObject(settings.source) || $.isArray(settings.source)) {
+ module.search.local(searchTerm);
+ }
+ else if( module.can.useAPI() ) {
+ module.search.remote(searchTerm);
+ }
+ else {
+ module.error(error.source);
+ }
+ }
+ settings.onSearchQuery.call(element, searchTerm);
+ }
+ else {
+ module.hideResults();
+ }
+ },
+
+ search: {
+ local: function(searchTerm) {
+ var
+ results = module.search.object(searchTerm, settings.content),
+ searchHTML
+ ;
+ module.set.loading();
+ module.save.results(results);
+ module.debug('Returned local search results', results);
+
+ searchHTML = module.generateResults({
+ results: results
+ });
+ module.remove.loading();
+ module.addResults(searchHTML);
+ module.inject.id(results);
+ module.write.cache(searchTerm, {
+ html : searchHTML,
+ results : results
+ });
+ },
+ remote: function(searchTerm) {
+ if($module.api('is loading')) {
+ $module.api('abort');
+ }
+ module.setup.api(searchTerm);
+ $module
+ .api('query')
+ ;
+ },
+ object: function(searchTerm, source, searchFields) {
+ var
+ results = [],
+ fuzzyResults = [],
+ searchExp = searchTerm.toString().replace(regExp.escape, '\\$&'),
+ matchRegExp = new RegExp(regExp.beginsWith + searchExp, 'i'),
+
+ // avoid duplicates when pushing results
+ addResult = function(array, result) {
+ var
+ notResult = ($.inArray(result, results) == -1),
+ notFuzzyResult = ($.inArray(result, fuzzyResults) == -1)
+ ;
+ if(notResult && notFuzzyResult) {
+ array.push(result);
+ }
+ }
+ ;
+ source = source || settings.source;
+ searchFields = (searchFields !== undefined)
+ ? searchFields
+ : settings.searchFields
+ ;
+
+ // search fields should be array to loop correctly
+ if(!$.isArray(searchFields)) {
+ searchFields = [searchFields];
+ }
+
+ // exit conditions if no source
+ if(source === undefined || source === false) {
+ module.error(error.source);
+ return [];
+ }
+
+ // iterate through search fields looking for matches
+ $.each(searchFields, function(index, field) {
+ $.each(source, function(label, content) {
+ var
+ fieldExists = (typeof content[field] == 'string')
+ ;
+ if(fieldExists) {
+ if( content[field].search(matchRegExp) !== -1) {
+ // content starts with value (first in results)
+ addResult(results, content);
+ }
+ else if(settings.searchFullText && module.fuzzySearch(searchTerm, content[field]) ) {
+ // content fuzzy matches (last in results)
+ addResult(fuzzyResults, content);
+ }
+ }
+ });
+ });
+ return $.merge(results, fuzzyResults);
+ }
+ },
+
+ fuzzySearch: function(query, term) {
+ var
+ termLength = term.length,
+ queryLength = query.length
+ ;
+ if(typeof query !== 'string') {
+ return false;
+ }
+ query = query.toLowerCase();
+ term = term.toLowerCase();
+ if(queryLength > termLength) {
+ return false;
+ }
+ if(queryLength === termLength) {
+ return (query === term);
+ }
+ search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {
+ var
+ queryCharacter = query.charCodeAt(characterIndex)
+ ;
+ while(nextCharacterIndex < termLength) {
+ if(term.charCodeAt(nextCharacterIndex++) === queryCharacter) {
+ continue search;
+ }
+ }
+ return false;
+ }
+ return true;
+ },
+
+ parse: {
+ response: function(response, searchTerm) {
+ var
+ searchHTML = module.generateResults(response)
+ ;
+ module.verbose('Parsing server response', response);
+ if(response !== undefined) {
+ if(searchTerm !== undefined && response[fields.results] !== undefined) {
+ module.addResults(searchHTML);
+ module.inject.id(response[fields.results]);
+ module.write.cache(searchTerm, {
+ html : searchHTML,
+ results : response[fields.results]
+ });
+ module.save.results(response[fields.results]);
+ }
+ }
+ }
+ },
+
+ cancel: {
+ query: function() {
+ if( module.can.useAPI() ) {
+ $module.api('abort');
+ }
+ }
+ },
+
+ has: {
+ minimumCharacters: function() {
+ var
+ searchTerm = module.get.value(),
+ numCharacters = searchTerm.length
+ ;
+ return (numCharacters >= settings.minCharacters);
+ }
+ },
+
+ clear: {
+ cache: function(value) {
+ var
+ cache = $module.data(metadata.cache)
+ ;
+ if(!value) {
+ module.debug('Clearing cache', value);
+ $module.removeData(metadata.cache);
+ }
+ else if(value && cache && cache[value]) {
+ module.debug('Removing value from cache', value);
+ delete cache[value];
+ $module.data(metadata.cache, cache);
+ }
+ }
+ },
+
+ read: {
+ cache: function(name) {
+ var
+ cache = $module.data(metadata.cache)
+ ;
+ if(settings.cache) {
+ module.verbose('Checking cache for generated html for query', name);
+ return (typeof cache == 'object') && (cache[name] !== undefined)
+ ? cache[name]
+ : false
+ ;
+ }
+ return false;
+ }
+ },
+
+ create: {
+ id: function(resultIndex, categoryIndex) {
+ var
+ resultID = (resultIndex + 1), // not zero indexed
+ categoryID = (categoryIndex + 1),
+ firstCharCode,
+ letterID,
+ id
+ ;
+ if(categoryIndex !== undefined) {
+ // start char code for "A"
+ letterID = String.fromCharCode(97 + categoryIndex);
+ id = letterID + resultID;
+ module.verbose('Creating category result id', id);
+ }
+ else {
+ id = resultID;
+ module.verbose('Creating result id', id);
+ }
+ return id;
+ },
+ results: function() {
+ if($results.length === 0) {
+ $results = $('<div />')
+ .addClass(className.results)
+ .appendTo($module)
+ ;
+ }
+ }
+ },
+
+ inject: {
+ result: function(result, resultIndex, categoryIndex) {
+ module.verbose('Injecting result into results');
+ var
+ $selectedResult = (categoryIndex !== undefined)
+ ? $results
+ .children().eq(categoryIndex)
+ .children(selector.result).eq(resultIndex)
+ : $results
+ .children(selector.result).eq(resultIndex)
+ ;
+ module.verbose('Injecting results metadata', $selectedResult);
+ $selectedResult
+ .data(metadata.result, result)
+ ;
+ },
+ id: function(results) {
+ module.debug('Injecting unique ids into results');
+ var
+ // since results may be object, we must use counters
+ categoryIndex = 0,
+ resultIndex = 0
+ ;
+ if(settings.type === 'category') {
+ // iterate through each category result
+ $.each(results, function(index, category) {
+ resultIndex = 0;
+ $.each(category.results, function(index, value) {
+ var
+ result = category.results[index]
+ ;
+ if(result.id === undefined) {
+ result.id = module.create.id(resultIndex, categoryIndex);
+ }
+ module.inject.result(result, resultIndex, categoryIndex);
+ resultIndex++;
+ });
+ categoryIndex++;
+ });
+ }
+ else {
+ // top level
+ $.each(results, function(index, value) {
+ var
+ result = results[index]
+ ;
+ if(result.id === undefined) {
+ result.id = module.create.id(resultIndex);
+ }
+ module.inject.result(result, resultIndex);
+ resultIndex++;
+ });
+ }
+ return results;
+ }
+ },
+
+ save: {
+ results: function(results) {
+ module.verbose('Saving current search results to metadata', results);
+ $module.data(metadata.results, results);
+ }
+ },
+
+ write: {
+ cache: function(name, value) {
+ var
+ cache = ($module.data(metadata.cache) !== undefined)
+ ? $module.data(metadata.cache)
+ : {}
+ ;
+ if(settings.cache) {
+ module.verbose('Writing generated html to cache', name, value);
+ cache[name] = value;
+ $module
+ .data(metadata.cache, cache)
+ ;
+ }
+ }
+ },
+
+ addResults: function(html) {
+ if( $.isFunction(settings.onResultsAdd) ) {
+ if( settings.onResultsAdd.call($results, html) === false ) {
+ module.debug('onResultsAdd callback cancelled default action');
+ return false;
+ }
+ }
+ if(html) {
+ $results
+ .html(html)
+ ;
+ module.refreshResults();
+ if(settings.selectFirstResult) {
+ module.select.firstResult();
+ }
+ module.showResults();
+ }
+ else {
+ module.hideResults();
+ }
+ },
+
+ showResults: function() {
+ if(!module.is.visible()) {
+ if( module.can.transition() ) {
+ module.debug('Showing results with css animations');
+ $results
+ .transition({
+ animation : settings.transition + ' in',
+ debug : settings.debug,
+ verbose : settings.verbose,
+ duration : settings.duration,
+ queue : true
+ })
+ ;
+ }
+ else {
+ module.debug('Showing results with javascript');
+ $results
+ .stop()
+ .fadeIn(settings.duration, settings.easing)
+ ;
+ }
+ settings.onResultsOpen.call($results);
+ }
+ },
+ hideResults: function() {
+ if( module.is.visible() ) {
+ if( module.can.transition() ) {
+ module.debug('Hiding results with css animations');
+ $results
+ .transition({
+ animation : settings.transition + ' out',
+ debug : settings.debug,
+ verbose : settings.verbose,
+ duration : settings.duration,
+ queue : true
+ })
+ ;
+ }
+ else {
+ module.debug('Hiding results with javascript');
+ $results
+ .stop()
+ .fadeOut(settings.duration, settings.easing)
+ ;
+ }
+ settings.onResultsClose.call($results);
+ }
+ },
+
+ generateResults: function(response) {
+ module.debug('Generating html from response', response);
+ var
+ template = settings.templates[settings.type],
+ isProperObject = ($.isPlainObject(response[fields.results]) && !$.isEmptyObject(response[fields.results])),
+ isProperArray = ($.isArray(response[fields.results]) && response[fields.results].length > 0),
+ html = ''
+ ;
+ if(isProperObject || isProperArray ) {
+ if(settings.maxResults > 0) {
+ if(isProperObject) {
+ if(settings.type == 'standard') {
+ module.error(error.maxResults);
+ }
+ }
+ else {
+ response[fields.results] = response[fields.results].slice(0, settings.maxResults);
+ }
+ }
+ if($.isFunction(template)) {
+ html = template(response, fields);
+ }
+ else {
+ module.error(error.noTemplate, false);
+ }
+ }
+ else if(settings.showNoResults) {
+ html = module.displayMessage(error.noResults, 'empty');
+ }
+ settings.onResults.call(element, response);
+ return html;
+ },
+
+ displayMessage: function(text, type) {
+ type = type || 'standard';
+ module.debug('Displaying message', text, type);
+ module.addResults( settings.templates.message(text, type) );
+ return settings.templates.message(text, type);
+ },
+
+ setting: function(name, value) {
+ if( $.isPlainObject(name) ) {
+ $.extend(true, settings, name);
+ }
+ else if(value !== undefined) {
+ settings[name] = value;
+ }
+ else {
+ return settings[name];
+ }
+ },
+ internal: function(name, value) {
+ if( $.isPlainObject(name) ) {
+ $.extend(true, module, name);
+ }
+ else if(value !== undefined) {
+ module[name] = value;
+ }
+ else {
+ return module[name];
+ }
+ },
+ debug: function() {
+ if(!settings.silent && settings.debug) {
+ if(settings.performance) {
+ module.performance.log(arguments);
+ }
+ else {
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
+ module.debug.apply(console, arguments);
+ }
+ }
+ },
+ verbose: function() {
+ if(!settings.silent && settings.verbose && settings.debug) {
+ if(settings.performance) {
+ module.performance.log(arguments);
+ }
+ else {
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
+ module.verbose.apply(console, arguments);
+ }
+ }
+ },
+ error: function() {
+ if(!settings.silent) {
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
+ module.error.apply(console, arguments);
+ }
+ },
+ performance: {
+ log: function(message) {
+ var
+ currentTime,
+ executionTime,
+ previousTime
+ ;
+ if(settings.performance) {
+ currentTime = new Date().getTime();
+ previousTime = time || currentTime;
+ executionTime = currentTime - previousTime;
+ time = currentTime;
+ performance.push({
+ 'Name' : message[0],
+ 'Arguments' : [].slice.call(message, 1) || '',
+ 'Element' : element,
+ 'Execution Time' : executionTime
+ });
+ }
+ clearTimeout(module.performance.timer);
+ module.performance.timer = setTimeout(module.performance.display, 500);
+ },
+ display: function() {
+ var
+ title = settings.name + ':',
+ totalTime = 0
+ ;
+ time = false;
+ clearTimeout(module.performance.timer);
+ $.each(performance, function(index, data) {
+ totalTime += data['Execution Time'];
+ });
+ title += ' ' + totalTime + 'ms';
+ if(moduleSelector) {
+ title += ' \'' + moduleSelector + '\'';
+ }
+ if($allModules.length > 1) {
+ title += ' ' + '(' + $allModules.length + ')';
+ }
+ if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
+ console.groupCollapsed(title);
+ if(console.table) {
+ console.table(performance);
+ }
+ else {
+ $.each(performance, function(index, data) {
+ console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
+ });
+ }
+ console.groupEnd();
+ }
+ performance = [];
+ }
+ },
+ invoke: function(query, passedArguments, context) {
+ var
+ object = instance,
+ maxDepth,
+ found,
+ response
+ ;
+ passedArguments = passedArguments || queryArguments;
+ context = element || context;
+ if(typeof query == 'string' && object !== undefined) {
+ query = query.split(/[\. ]/);
+ maxDepth = query.length - 1;
+ $.each(query, function(depth, value) {
+ var camelCaseValue = (depth != maxDepth)
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
+ : query
+ ;
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
+ object = object[camelCaseValue];
+ }
+ else if( object[camelCaseValue] !== undefined ) {
+ found = object[camelCaseValue];
+ return false;
+ }
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
+ object = object[value];
+ }
+ else if( object[value] !== undefined ) {
+ found = object[value];
+ return false;
+ }
+ else {
+ return false;
+ }
+ });
+ }
+ if( $.isFunction( found ) ) {
+ response = found.apply(context, passedArguments);
+ }
+ else if(found !== undefined) {
+ response = found;
+ }
+ if($.isArray(returnedValue)) {
+ returnedValue.push(response);
+ }
+ else if(returnedValue !== undefined) {
+ returnedValue = [returnedValue, response];
+ }
+ else if(response !== undefined) {
+ returnedValue = response;
+ }
+ return found;
+ }
+ };
+ if(methodInvoked) {
+ if(instance === undefined) {
+ module.initialize();
+ }
+ module.invoke(query);
+ }
+ else {
+ if(instance !== undefined) {
+ instance.invoke('destroy');
+ }
+ module.initialize();
+ }
+
+ })
+ ;
+
+ return (returnedValue !== undefined)
+ ? returnedValue
+ : this
+ ;
+};
+
+$.fn.search.settings = {
+
+ name : 'Search',
+ namespace : 'search',
+
+ silent : false,
+ debug : false,
+ verbose : false,
+ performance : true,
+
+ // template to use (specified in settings.templates)
+ type : 'standard',
+
+ // minimum characters required to search
+ minCharacters : 1,
+
+ // whether to select first result after searching automatically
+ selectFirstResult : false,
+
+ // API config
+ apiSettings : false,
+
+ // object to search
+ source : false,
+
+ // fields to search
+ searchFields : [
+ 'title',
+ 'description'
+ ],
+
+ // field to display in standard results template
+ displayField : '',
+
+ // whether to include fuzzy results in local search
+ searchFullText : true,
+
+ // whether to add events to prompt automatically
+ automatic : true,
+
+ // delay before hiding menu after blur
+ hideDelay : 0,
+
+ // delay before searching
+ searchDelay : 200,
+
+ // maximum results returned from local
+ maxResults : 7,
+
+ // whether to store lookups in local cache
+ cache : true,
+
+ // whether no results errors should be shown
+ showNoResults : true,
+
+ // transition settings
+ transition : 'scale',
+ duration : 200,
+ easing : 'easeOutExpo',
+
+ // callbacks
+ onSelect : false,
+ onResultsAdd : false,
+
+ onSearchQuery : function(query){},
+ onResults : function(response){},
+
+ onResultsOpen : function(){},
+ onResultsClose : function(){},
+
+ className: {
+ animating : 'animating',
+ active : 'active',
+ empty : 'empty',
+ focus : 'focus',
+ hidden : 'hidden',
+ loading : 'loading',
+ results : 'results',
+ pressed : 'down'
+ },
+
+ error : {
+ source : 'Cannot search. No source used, and Semantic API module was not included',
+ noResults : 'Your search returned no results',
+ logging : 'Error in debug logging, exiting.',
+ noEndpoint : 'No search endpoint was specified',
+ noTemplate : 'A valid template name was not specified.',
+ serverError : 'There was an issue querying the server.',
+ maxResults : 'Results must be an array to use maxResults setting',
+ method : 'The method you called is not defined.'
+ },
+
+ metadata: {
+ cache : 'cache',
+ results : 'results',
+ result : 'result'
+ },
+
+ regExp: {
+ escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
+ beginsWith : '(?:\s|^)'
+ },
+
+ // maps api response attributes to internal representation
+ fields: {
+ categories : 'results', // array of categories (category view)
+ categoryName : 'name', // name of category (category view)
+ categoryResults : 'results', // array of results (category view)
+ description : 'description', // result description
+ image : 'image', // result image
+ price : 'price', // result price
+ results : 'results', // array of results (standard)
+ title : 'title', // result title
+ url : 'url', // result url
+ action : 'action', // "view more" object name
+ actionText : 'text', // "view more" text
+ actionURL : 'url' // "view more" url
+ },
+
+ selector : {
+ prompt : '.prompt',
+ searchButton : '.search.button',
+ results : '.results',
+ message : '.results > .message',
+ category : '.category',
+ result : '.result',
+ title : '.title, .name'
+ },
+
+ templates: {
+ escape: function(string) {
+ var
+ badChars = /[&<>"'`]/g,
+ shouldEscape = /[&<>"'`]/,
+ escape = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ '"': """,
+ "'": "'",
+ "`": "`"
+ },
+ escapedChar = function(chr) {
+ return escape[chr];
+ }
+ ;
+ if(shouldEscape.test(string)) {
+ return string.replace(badChars, escapedChar);
+ }
+ return string;
+ },
+ message: function(message, type) {
+ var
+ html = ''
+ ;
+ if(message !== undefined && type !== undefined) {
+ html += ''
+ + '<div class="message ' + type + '">'
+ ;
+ // message type
+ if(type == 'empty') {
+ html += ''
+ + '<div class="header">No Results</div class="header">'
+ + '<div class="description">' + message + '</div class="description">'
+ ;
+ }
+ else {
+ html += ' <div class="description">' + message + '</div>';
+ }
+ html += '</div>';
+ }
+ return html;
+ },
+ category: function(response, fields) {
+ var
+ html = '',
+ escape = $.fn.search.settings.templates.escape
+ ;
+ if(response[fields.categoryResults] !== undefined) {
+
+ // each category
+ $.each(response[fields.categoryResults], function(index, category) {
+ if(category[fields.results] !== undefined && category.results.length > 0) {
+
+ html += '<div class="category">';
+
+ if(category[fields.categoryName] !== undefined) {
+ html += '<div class="name">' + category[fields.categoryName] + '</div>';
+ }
+
+ // each item inside category
+ $.each(category.results, function(index, result) {
+ if(result[fields.url]) {
+ html += '<a class="result" href="' + result[fields.url] + '">';
+ }
+ else {
+ html += '<a class="result">';
+ }
+ if(result[fields.image] !== undefined) {
+ html += ''
+ + '<div class="image">'
+ + ' <img src="' + result[fields.image] + '">'
+ + '</div>'
+ ;
+ }
+ html += '<div class="content">';
+ if(result[fields.price] !== undefined) {
+ html += '<div class="price">' + result[fields.price] + '</div>';
+ }
+ if(result[fields.title] !== undefined) {
+ html += '<div class="title">' + result[fields.title] + '</div>';
+ }
+ if(result[fields.description] !== undefined) {
+ html += '<div class="description">' + result[fields.description] + '</div>';
+ }
+ html += ''
+ + '</div>'
+ ;
+ html += '</a>';
+ });
+ html += ''
+ + '</div>'
+ ;
+ }
+ });
+ if(response[fields.action]) {
+ html += ''
+ + '<a href="' + response[fields.action][fields.actionURL] + '" class="action">'
+ + response[fields.action][fields.actionText]
+ + '</a>';
+ }
+ return html;
+ }
+ return false;
+ },
+ standard: function(response, fields) {
+ var
+ html = ''
+ ;
+ if(response[fields.results] !== undefined) {
+
+ // each result
+ $.each(response[fields.results], function(index, result) {
+ if(result[fields.url]) {
+ html += '<a class="result" href="' + result[fields.url] + '">';
+ }
+ else {
+ html += '<a class="result">';
+ }
+ if(result[fields.image] !== undefined) {
+ html += ''
+ + '<div class="image">'
+ + ' <img src="' + result[fields.image] + '">'
+ + '</div>'
+ ;
+ }
+ html += '<div class="content">';
+ if(result[fields.price] !== undefined) {
+ html += '<div class="price">' + result[fields.price] + '</div>';
+ }
+ if(result[fields.title] !== undefined) {
+ html += '<div class="title">' + result[fields.title] + '</div>';
+ }
+ if(result[fields.description] !== undefined) {
+ html += '<div class="description">' + result[fields.description] + '</div>';
+ }
+ html += ''
+ + '</div>'
+ ;
+ html += '</a>';
+ });
+
+ if(response[fields.action]) {
+ html += ''
+ + '<a href="' + response[fields.action][fields.actionURL] + '" class="action">'
+ + response[fields.action][fields.actionText]
+ + '</a>';
+ }
+ return html;
+ }
+ return false;
+ }
+ }
+};
+
+})( jQuery, window, document );
http://git-wip-us.apache.org/repos/asf/incubator-senssoft/blob/855d3ab1/semantic/dist/components/search.min.css
----------------------------------------------------------------------
diff --git a/semantic/dist/components/search.min.css b/semantic/dist/components/search.min.css
new file mode 100755
index 0000000..a191b86
--- /dev/null
+++ b/semantic/dist/components/search.min.css
@@ -0,0 +1,9 @@
+/*!
+ * # Semantic UI 2.2.6 - Search
+ * http://github.com/semantic-org/semantic-ui/
+ *
+ *
+ * Released under the MIT license
+ * http://opensource.org/licenses/MIT
+ *
+ */.ui.search{position:relative}.ui.search>.prompt{margin:0;outline:0;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);text-shadow:none;font-style:normal;font-weight:400;line-height:1.2142em;padding:.67861429em 1em;font-size:1em;background:#EBEBEB;border:1px solid rgba(34,36,38,.15);color:#262626;box-shadow:0 0 0 0 transparent inset;-webkit-transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease}.ui.search .prompt{border-radius:500rem}.ui.search .prompt~.search.icon{cursor:pointer}.ui.search>.results{display:none;position:absolute;top:100%;left:0;-webkit-transform-origin:center top;transform-origin:center top;white-space:normal;background:#FFF;margin-top:.5em;width:18em;border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);border:1px solid #D4D4D5;z-index:998}.ui.search>.results>:firs
t-child{border-radius:.28571429rem .28571429rem 0 0}.ui.search>.results>:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.search>.results .result{cursor:pointer;display:block;overflow:hidden;font-size:1em;padding:.85714286em 1.14285714em;color:#262626;line-height:1.33;border-bottom:1px solid rgba(34,36,38,.1)}.ui.search>.results .result:last-child{border-bottom:none!important}.ui.search>.results .result .image{float:right;overflow:hidden;background:0 0;width:5em;height:3em;border-radius:.25em}.ui.search>.results .result .image img{display:block;width:auto;height:100%}.ui.search>.results .result .image+.content{margin:0 6em 0 0}.ui.search>.results .result .title{margin:-.14285em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;font-size:1em;color:rgba(0,0,0,.85)}.ui.search>.results .result .description{margin-top:0;font-size:.92857143em;color:rgba(0,0,0,.4)}.ui.search>.results .result .price{float:right;color:#BFD02C}.ui.search>.results>.mess
age{padding:1em}.ui.search>.results>.message .header{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1rem;font-weight:700;color:#262626}.ui.search>.results>.message .description{margin-top:.25rem;font-size:1em;color:#262626}.ui.search>.results>.action{display:block;border-top:none;background:#F3F4F5;padding:.92857143em 1em;color:#262626;font-weight:700;text-align:center}.ui.search>.prompt:focus{border-color:rgba(34,36,38,.35);background:#EBEBEB;color:rgba(0,0,0,.95)}.ui.loading.search .input>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.search .input>i.icon:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation
-iteration-count:infinite;border-radius:500rem;border-color:#54595B transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}.ui.category.search>.results .category .result:hover,.ui.search>.results .result:hover{background:#F9FAFB}.ui.search .action:hover{background:#E0E0E0}.ui.category.search>.results .category.active{background:#F3F4F5}.ui.category.search>.results .category.active>.name{color:#262626}.ui.category.search>.results .category .result.active,.ui.search>.results .result.active{position:relative;border-left-color:rgba(34,36,38,.1);background:#F3F4F5;box-shadow:none}.ui.search>.results .result.active .description,.ui.search>.results .result.active .title{color:rgba(0,0,0,.85)}.ui.search.selection .prompt{border-radius:.28571429rem}.ui.search.selection>.icon.input>.remove.icon{pointer-events:none;position:absolute;left:auto;opacity:0;color:'';top:0;right:0;-webkit-transition:color .1s ease,opacity .1s ease;transition:color .1s ease,opac
ity .1s ease}.ui.search.selection>.icon.input>.active.remove.icon{cursor:pointer;opacity:.8;pointer-events:auto}.ui.search.selection>.icon.input:not([class*="left icon"])>.icon~.remove.icon{right:1.85714em}.ui.search.selection>.icon.input>.remove.icon:hover{opacity:1;color:#E24614}.ui.category.search .results{width:28em}.ui.category.search>.results .category{background:#F3F4F5;box-shadow:none;border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease}.ui.category.search>.results .category:last-child{border-bottom:none}.ui.category.search>.results .category:first-child .name+.result{border-radius:0 .28571429rem 0 0}.ui.category.search>.results .category .result{background:#EBEBEB;margin-left:100px;border-left:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ea
se;padding:.85714286em 1.14285714em}.ui.category.search>.results .category:last-child .result:last-child{border-radius:0 0 .28571429rem;border-bottom:none}.ui.category.search>.results .category>.name{width:100px;background:0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;float:1em;float:left;padding:.4em 1em;font-weight:700;color:rgba(0,0,0,.4)}.ui[class*="left aligned"].search>.results{right:auto;left:0}.ui[class*="right aligned"].search>.results{right:0;left:auto}.ui.fluid.search .results{width:100%}.ui.mini.search{font-size:.78571429em}.ui.small.search{font-size:.92857143em}.ui.search{font-size:1em}.ui.large.search{font-size:1.14285714em}.ui.big.search{font-size:1.28571429em}.ui.huge.search{font-size:1.42857143em}.ui.massive.search{font-size:1.71428571em}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-senssoft/blob/855d3ab1/semantic/dist/components/search.min.js
----------------------------------------------------------------------
diff --git a/semantic/dist/components/search.min.js b/semantic/dist/components/search.min.js
new file mode 100644
index 0000000..eaf6bc9
--- /dev/null
+++ b/semantic/dist/components/search.min.js
@@ -0,0 +1,10 @@
+/*!
+ * # Semantic UI 2.2.6 - Search
+ * http://github.com/semantic-org/semantic-ui/
+ *
+ *
+ * Released under the MIT license
+ * http://opensource.org/licenses/MIT
+ *
+ */
+!function(e,t,s,n){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.search=function(r){var i,a=e(this),o=a.selector||"",c=(new Date).getTime(),u=[],l=arguments[0],d="string"==typeof l,f=[].slice.call(arguments,1);return e(this).each(function(){var g,h=e.isPlainObject(r)?e.extend(!0,{},e.fn.search.settings,r):e.extend({},e.fn.search.settings),p=h.className,v=h.metadata,m=h.regExp,b=h.fields,y=h.selector,R=h.error,C=h.namespace,w="."+C,x=C+"-module",j=e(this),k=j.find(y.prompt),A=j.find(y.searchButton),E=j.find(y.results),q=j.find(y.result),F=j.find(y.category),S=this,T=j.data(x),D=!1;g={initialize:function(){g.verbose("Initializing module"),g.determine.searchFields(),g.bind.events(),g.set.type(),g.create.results(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),T=g,j.data(x,g)},destroy:function(){g.verbose("Destroying instance"),j.off(w).removeData(x)},refresh:function(
){g.debug("Refreshing selector cache"),k=j.find(y.prompt),A=j.find(y.searchButton),F=j.find(y.category),E=j.find(y.results),q=j.find(y.result)},refreshResults:function(){E=j.find(y.results),q=j.find(y.result)},bind:{events:function(){g.verbose("Binding events to search"),h.automatic&&(j.on(g.get.inputEvent()+w,y.prompt,g.event.input),k.attr("autocomplete","off")),j.on("focus"+w,y.prompt,g.event.focus).on("blur"+w,y.prompt,g.event.blur).on("keydown"+w,y.prompt,g.handleKeyboard).on("click"+w,y.searchButton,g.query).on("mousedown"+w,y.results,g.event.result.mousedown).on("mouseup"+w,y.results,g.event.result.mouseup).on("click"+w,y.result,g.event.result.click)}},determine:{searchFields:function(){r&&r.searchFields!==n&&(h.searchFields=r.searchFields)}},event:{input:function(){clearTimeout(g.timer),g.timer=setTimeout(g.query,h.searchDelay)},focus:function(){g.set.focus(),g.has.minimumCharacters()&&(g.query(),g.can.show()&&g.showResults())},blur:function(e){var t=s.activeElement===this,n=
function(){g.cancel.query(),g.remove.focus(),g.timer=setTimeout(g.hideResults,h.hideDelay)};t||(g.resultsClicked?(g.debug("Determining if user action caused search to close"),j.one("click.close"+w,y.results,function(e){return g.is.inMessage(e)||D?void k.focus():(D=!1,void(g.is.animating()||g.is.hidden()||n()))})):(g.debug("Input blurred without user action, closing results"),n()))},result:{mousedown:function(){g.resultsClicked=!0},mouseup:function(){g.resultsClicked=!1},click:function(s){g.debug("Search result selected");var n=e(this),r=n.find(y.title).eq(0),i=n.is("a[href]")?n:n.find("a[href]").eq(0),a=i.attr("href")||!1,o=i.attr("target")||!1,c=(r.html(),r.length>0&&r.text()),u=g.get.results(),l=n.data(v.result)||g.get.result(c,u);return e.isFunction(h.onSelect)&&h.onSelect.call(S,l,u)===!1?(g.debug("Custom onSelect callback cancelled default select action"),void(D=!0)):(g.hideResults(),c&&g.set.value(c),void(a&&(g.verbose("Opening search link found in result",i),"_blank"==o||s.ct
rlKey?t.open(a):t.location.href=a)))}}},handleKeyboard:function(e){var t,s=j.find(y.result),n=j.find(y.category),r=s.filter("."+p.active),i=s.index(r),a=s.length,o=r.length>0,c=e.which,u={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(c==u.escape&&(g.verbose("Escape key pressed, blurring search field"),g.trigger.blur()),g.is.visible())if(c==u.enter){if(g.verbose("Enter key pressed, selecting active result"),s.filter("."+p.active).length>0)return g.event.result.click.call(s.filter("."+p.active),e),e.preventDefault(),!1}else c==u.upArrow&&o?(g.verbose("Up key pressed, changing active result"),t=i-1<0?i:i-1,n.removeClass(p.active),s.removeClass(p.active).eq(t).addClass(p.active).closest(n).addClass(p.active),e.preventDefault()):c==u.downArrow&&(g.verbose("Down key pressed, changing active result"),t=i+1>=a?i:i+1,n.removeClass(p.active),s.removeClass(p.active).eq(t).addClass(p.active).closest(n).addClass(p.active),e.preventDefault());else c==u.enter&&(g.verbose("Enter key pr
essed, executing query"),g.query(),g.set.buttonPressed(),k.one("keyup",g.remove.buttonFocus))},setup:{api:function(t){var s={debug:h.debug,on:!1,cache:!0,action:"search",urlData:{query:t},onSuccess:function(e){g.parse.response.call(S,e,t)},onAbort:function(e){},onFailure:function(){g.displayMessage(R.serverError)},onError:g.error};e.extend(!0,s,h.apiSettings),g.verbose("Setting up API request",s),j.api(s)}},can:{useAPI:function(){return e.fn.api!==n},show:function(){return g.is.focused()&&!g.is.visible()&&!g.is.empty()},transition:function(){return h.transition&&e.fn.transition!==n&&j.transition("is supported")}},is:{animating:function(){return E.hasClass(p.animating)},hidden:function(){return E.hasClass(p.hidden)},inMessage:function(t){if(t.target){var n=e(t.target),r=e.contains(s.documentElement,t.target);return r&&n.closest(y.message).length>0}},empty:function(){return""===E.html()},visible:function(){return E.filter(":visible").length>0},focused:function(){return k.filter(":focu
s").length>0}},trigger:{blur:function(){var e=s.createEvent("HTMLEvents"),t=k[0];t&&(g.verbose("Triggering native blur event"),e.initEvent("blur",!1,!1),t.dispatchEvent(e))}},get:{inputEvent:function(){var e=k[0],t=e!==n&&e.oninput!==n?"input":e!==n&&e.onpropertychange!==n?"propertychange":"keyup";return t},value:function(){return k.val()},results:function(){var e=j.data(v.results);return e},result:function(t,s){var r=["title","id"],i=!1;return t=t!==n?t:g.get.value(),s=s!==n?s:g.get.results(),"category"===h.type?(g.debug("Finding result that matches",t),e.each(s,function(s,n){if(e.isArray(n.results)&&(i=g.search.object(t,n.results,r)[0]))return!1})):(g.debug("Finding result in results object",t),i=g.search.object(t,s,r)[0]),i||!1}},select:{firstResult:function(){g.verbose("Selecting first result"),q.first().addClass(p.active)}},set:{focus:function(){j.addClass(p.focus)},loading:function(){j.addClass(p.loading)},value:function(e){g.verbose("Setting search input value",e),k.val(e)},t
ype:function(e){e=e||h.type,"category"==h.type&&j.addClass(h.type)},buttonPressed:function(){A.addClass(p.pressed)}},remove:{loading:function(){j.removeClass(p.loading)},focus:function(){j.removeClass(p.focus)},buttonPressed:function(){A.removeClass(p.pressed)}},query:function(){var t=g.get.value(),s=g.read.cache(t);g.has.minimumCharacters()?(s?(g.debug("Reading result from cache",t),g.save.results(s.results),g.addResults(s.html),g.inject.id(s.results)):(g.debug("Querying for",t),e.isPlainObject(h.source)||e.isArray(h.source)?g.search.local(t):g.can.useAPI()?g.search.remote(t):g.error(R.source)),h.onSearchQuery.call(S,t)):g.hideResults()},search:{local:function(e){var t,s=g.search.object(e,h.content);g.set.loading(),g.save.results(s),g.debug("Returned local search results",s),t=g.generateResults({results:s}),g.remove.loading(),g.addResults(t),g.inject.id(s),g.write.cache(e,{html:t,results:s})},remote:function(e){j.api("is loading")&&j.api("abort"),g.setup.api(e),j.api("query")},obje
ct:function(t,s,r){var i=[],a=[],o=t.toString().replace(m.escape,"\\$&"),c=new RegExp(m.beginsWith+o,"i"),u=function(t,s){var n=e.inArray(s,i)==-1,r=e.inArray(s,a)==-1;n&&r&&t.push(s)};return s=s||h.source,r=r!==n?r:h.searchFields,e.isArray(r)||(r=[r]),s===n||s===!1?(g.error(R.source),[]):(e.each(r,function(n,r){e.each(s,function(e,s){var n="string"==typeof s[r];n&&(s[r].search(c)!==-1?u(i,s):h.searchFullText&&g.fuzzySearch(t,s[r])&&u(a,s))})}),e.merge(i,a))}},fuzzySearch:function(e,t){var s=t.length,n=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n>s)return!1;if(n===s)return e===t;e:for(var r=0,i=0;r<n;r++){for(var a=e.charCodeAt(r);i<s;)if(t.charCodeAt(i++)===a)continue e;return!1}return!0},parse:{response:function(e,t){var s=g.generateResults(e);g.verbose("Parsing server response",e),e!==n&&t!==n&&e[b.results]!==n&&(g.addResults(s),g.inject.id(e[b.results]),g.write.cache(t,{html:s,results:e[b.results]}),g.save.results(e[b.results]))}},cancel:{quer
y:function(){g.can.useAPI()&&j.api("abort")}},has:{minimumCharacters:function(){var e=g.get.value(),t=e.length;return t>=h.minCharacters}},clear:{cache:function(e){var t=j.data(v.cache);e?e&&t&&t[e]&&(g.debug("Removing value from cache",e),delete t[e],j.data(v.cache,t)):(g.debug("Clearing cache",e),j.removeData(v.cache))}},read:{cache:function(e){var t=j.data(v.cache);return!!h.cache&&(g.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==n&&t[e])}},create:{id:function(e,t){var s,r,i=e+1;return t!==n?(s=String.fromCharCode(97+t),r=s+i,g.verbose("Creating category result id",r)):(r=i,g.verbose("Creating result id",r)),r},results:function(){0===E.length&&(E=e("<div />").addClass(p.results).appendTo(j))}},inject:{result:function(e,t,s){g.verbose("Injecting result into results");var r=s!==n?E.children().eq(s).children(y.result).eq(t):E.children(y.result).eq(t);g.verbose("Injecting results metadata",r),r.data(v.result,e)},id:function(t){g.debug("Injecting
unique ids into results");var s=0,r=0;return"category"===h.type?e.each(t,function(t,i){r=0,e.each(i.results,function(e,t){var a=i.results[e];a.id===n&&(a.id=g.create.id(r,s)),g.inject.result(a,r,s),r++}),s++}):e.each(t,function(e,s){var i=t[e];i.id===n&&(i.id=g.create.id(r)),g.inject.result(i,r),r++}),t}},save:{results:function(e){g.verbose("Saving current search results to metadata",e),j.data(v.results,e)}},write:{cache:function(e,t){var s=j.data(v.cache)!==n?j.data(v.cache):{};h.cache&&(g.verbose("Writing generated html to cache",e,t),s[e]=t,j.data(v.cache,s))}},addResults:function(t){return e.isFunction(h.onResultsAdd)&&h.onResultsAdd.call(E,t)===!1?(g.debug("onResultsAdd callback cancelled default action"),!1):void(t?(E.html(t),g.refreshResults(),h.selectFirstResult&&g.select.firstResult(),g.showResults()):g.hideResults())},showResults:function(){g.is.visible()||(g.can.transition()?(g.debug("Showing results with css animations"),E.transition({animation:h.transition+" in",debug:h
.debug,verbose:h.verbose,duration:h.duration,queue:!0})):(g.debug("Showing results with javascript"),E.stop().fadeIn(h.duration,h.easing)),h.onResultsOpen.call(E))},hideResults:function(){g.is.visible()&&(g.can.transition()?(g.debug("Hiding results with css animations"),E.transition({animation:h.transition+" out",debug:h.debug,verbose:h.verbose,duration:h.duration,queue:!0})):(g.debug("Hiding results with javascript"),E.stop().fadeOut(h.duration,h.easing)),h.onResultsClose.call(E))},generateResults:function(t){g.debug("Generating html from response",t);var s=h.templates[h.type],n=e.isPlainObject(t[b.results])&&!e.isEmptyObject(t[b.results]),r=e.isArray(t[b.results])&&t[b.results].length>0,i="";return n||r?(h.maxResults>0&&(n?"standard"==h.type&&g.error(R.maxResults):t[b.results]=t[b.results].slice(0,h.maxResults)),e.isFunction(s)?i=s(t,b):g.error(R.noTemplate,!1)):h.showNoResults&&(i=g.displayMessage(R.noResults,"empty")),h.onResults.call(S,t),i},displayMessage:function(e,t){return
t=t||"standard",g.debug("Displaying message",e,t),g.addResults(h.templates.message(e,t)),h.templates.message(e,t)},setting:function(t,s){if(e.isPlainObject(t))e.extend(!0,h,t);else{if(s===n)return h[t];h[t]=s}},internal:function(t,s){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(s===n)return g[t];g[t]=s}},debug:function(){!h.silent&&h.debug&&(h.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,h.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),g.verbose.apply(console,arguments)))},error:function(){h.silent||(g.error=Function.prototype.bind.call(console.error,console,h.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,s,n;h.performance&&(t=(new Date).getTime(),n=c||t,s=t-n,c=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execu
tion Time":s})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var t=h.name+":",s=0;c=!1,clearTimeout(g.performance.timer),e.each(u,function(e,t){s+=t["Execution Time"]}),t+=" "+s+"ms",o&&(t+=" '"+o+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==n||console.table!==n)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,s,r){var a,o,c,u=T;return s=s||f,r=S||r,"string"==typeof t&&u!==n&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(s,r){var i=s!=a?r+t[s+1].charAt(0).toUpperCase()+t[s+1].slice(1):t;if(e.isPlainObject(u[i])&&s!=a)u=u[i];else{if(u[i]!==n)return o=u[i],!1;if(!e.isPlainObject(u[r])||s==a)return u[r]!==n&&(o=u[r],!1);u=u[r]}})),e.isFunction(o)?c=o.apply(r,s):o!==n&&(c=o),e.isArray(i)?i.push(c):i!==n?i=[i,c]:c!==n&&(i=c),o}},d?(T===n&&g.initialize(),g.invoke(l)
):(T!==n&&T.invoke("destroy"),g.initialize())}),i!==n?i:this},e.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchFields:["title","description"],displayField:"",searchFullText:!0,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.
",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,s=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r=function(e){return n[e]};return s.test(e)?e.replace(t,r):e},message:function(e,t){var s="";return e!==n&&t!==n&&(s+='<div class="message '+t+'">',s+="empty"==t?'<div
class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",s+="</div>"),s},category:function(t,s){var r="";e.fn.search.settings.templates.escape;return t[s.categoryResults]!==n&&(e.each(t[s.categoryResults],function(t,i){i[s.results]!==n&&i.results.length>0&&(r+='<div class="category">',i[s.categoryName]!==n&&(r+='<div class="name">'+i[s.categoryName]+"</div>"),e.each(i.results,function(e,t){r+=t[s.url]?'<a class="result" href="'+t[s.url]+'">':'<a class="result">',t[s.image]!==n&&(r+='<div class="image"> <img src="'+t[s.image]+'"></div>'),r+='<div class="content">',t[s.price]!==n&&(r+='<div class="price">'+t[s.price]+"</div>"),t[s.title]!==n&&(r+='<div class="title">'+t[s.title]+"</div>"),t[s.description]!==n&&(r+='<div class="description">'+t[s.description]+"</div>"),r+="</div>",r+="</a>"}),r+="</div>")}),t[s.action]&&(r+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.action
Text]+"</a>"),r)},standard:function(t,s){var r="";return t[s.results]!==n&&(e.each(t[s.results],function(e,t){r+=t[s.url]?'<a class="result" href="'+t[s.url]+'">':'<a class="result">',t[s.image]!==n&&(r+='<div class="image"> <img src="'+t[s.image]+'"></div>'),r+='<div class="content">',t[s.price]!==n&&(r+='<div class="price">'+t[s.price]+"</div>"),t[s.title]!==n&&(r+='<div class="title">'+t[s.title]+"</div>"),t[s.description]!==n&&(r+='<div class="description">'+t[s.description]+"</div>"),r+="</div>",r+="</a>"}),t[s.action]&&(r+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.actionText]+"</a>"),r)}}}}(jQuery,window,document);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-senssoft/blob/855d3ab1/semantic/dist/components/segment.css
----------------------------------------------------------------------
diff --git a/semantic/dist/components/segment.css b/semantic/dist/components/segment.css
new file mode 100755
index 0000000..b1dd55d
--- /dev/null
+++ b/semantic/dist/components/segment.css
@@ -0,0 +1,791 @@
+/*!
+ * # Semantic UI 2.2.6 - Segment
+ * http://github.com/semantic-org/semantic-ui/
+ *
+ *
+ * Released under the MIT license
+ * http://opensource.org/licenses/MIT
+ *
+ */
+
+
+/*******************************
+ Segment
+*******************************/
+
+.ui.segment {
+ position: relative;
+ background: #EBEBEB;
+ box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15);
+ margin: 1rem 0em;
+ padding: 1em 1em;
+ border-radius: 0.28571429rem;
+ border: 1px solid rgba(34, 36, 38, 0.15);
+}
+.ui.segment:first-child {
+ margin-top: 0em;
+}
+.ui.segment:last-child {
+ margin-bottom: 0em;
+}
+
+/* Vertical */
+.ui.vertical.segment {
+ margin: 0em;
+ padding-left: 0em;
+ padding-right: 0em;
+ background: none transparent;
+ border-radius: 0px;
+ box-shadow: none;
+ border: none;
+ border-bottom: 1px solid rgba(34, 36, 38, 0.15);
+}
+.ui.vertical.segment:last-child {
+ border-bottom: none;
+}
+
+/*-------------------
+ Loose Coupling
+--------------------*/
+
+
+/* Header */
+.ui.inverted.segment > .ui.header {
+ color: #EBEBEB;
+}
+
+/* Label */
+.ui[class*="bottom attached"].segment > [class*="top attached"].label {
+ border-top-left-radius: 0em;
+ border-top-right-radius: 0em;
+}
+.ui[class*="top attached"].segment > [class*="bottom attached"].label {
+ border-bottom-left-radius: 0em;
+ border-bottom-right-radius: 0em;
+}
+.ui.attached.segment:not(.top):not(.bottom) > [class*="top attached"].label {
+ border-top-left-radius: 0em;
+ border-top-right-radius: 0em;
+}
+.ui.attached.segment:not(.top):not(.bottom) > [class*="bottom attached"].label {
+ border-bottom-left-radius: 0em;
+ border-bottom-right-radius: 0em;
+}
+
+/* Grid */
+.ui.page.grid.segment,
+.ui.grid > .row > .ui.segment.column,
+.ui.grid > .ui.segment.column {
+ padding-top: 2em;
+ padding-bottom: 2em;
+}
+.ui.grid.segment {
+ margin: 1rem 0em;
+ border-radius: 0.28571429rem;
+}
+
+/* Table */
+.ui.basic.table.segment {
+ background: #EBEBEB;
+ border: 1px solid rgba(34, 36, 38, 0.15);
+ box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15);
+}
+.ui[class*="very basic"].table.segment {
+ padding: 1em 1em;
+}
+
+
+/*******************************
+ Types
+*******************************/
+
+
+/*-------------------
+ Piled
+--------------------*/
+
+.ui.piled.segments,
+.ui.piled.segment {
+ margin: 3em 0em;
+ box-shadow: '';
+ z-index: auto;
+}
+.ui.piled.segment:first-child {
+ margin-top: 0em;
+}
+.ui.piled.segment:last-child {
+ margin-bottom: 0em;
+}
+.ui.piled.segments:after,
+.ui.piled.segments:before,
+.ui.piled.segment:after,
+.ui.piled.segment:before {
+ background-color: #EBEBEB;
+ visibility: visible;
+ content: '';
+ display: block;
+ height: 100%;
+ left: 0px;
+ position: absolute;
+ width: 100%;
+ border: 1px solid rgba(34, 36, 38, 0.15);
+ box-shadow: '';
+}
+.ui.piled.segments:before,
+.ui.piled.segment:before {
+ -webkit-transform: rotate(-1.2deg);
+ transform: rotate(-1.2deg);
+ top: 0;
+ z-index: -2;
+}
+.ui.piled.segments:after,
+.ui.piled.segment:after {
+ -webkit-transform: rotate(1.2deg);
+ transform: rotate(1.2deg);
+ top: 0;
+ z-index: -1;
+}
+
+/* Piled Attached */
+.ui[class*="top attached"].piled.segment {
+ margin-top: 3em;
+ margin-bottom: 0em;
+}
+.ui.piled.segment[class*="top attached"]:first-child {
+ margin-top: 0em;
+}
+.ui.piled.segment[class*="bottom attached"] {
+ margin-top: 0em;
+ margin-bottom: 3em;
+}
+.ui.piled.segment[class*="bottom attached"]:last-child {
+ margin-bottom: 0em;
+}
+
+/*-------------------
+ Stacked
+--------------------*/
+
+.ui.stacked.segment {
+ padding-bottom: 1.4em;
+}
+.ui.stacked.segments:before,
+.ui.stacked.segments:after,
+.ui.stacked.segment:before,
+.ui.stacked.segment:after {
+ content: '';
+ position: absolute;
+ bottom: -3px;
+ left: 0%;
+ border-top: 1px solid rgba(34, 36, 38, 0.15);
+ background: rgba(0, 0, 0, 0.03);
+ width: 100%;
+ height: 6px;
+ visibility: visible;
+}
+.ui.stacked.segments:before,
+.ui.stacked.segment:before {
+ display: none;
+}
+
+/* Add additional page */
+.ui.tall.stacked.segments:before,
+.ui.tall.stacked.segment:before {
+ display: block;
+ bottom: 0px;
+}
+
+/* Inverted */
+.ui.stacked.inverted.segments:before,
+.ui.stacked.inverted.segments:after,
+.ui.stacked.inverted.segment:before,
+.ui.stacked.inverted.segment:after {
+ background-color: rgba(0, 0, 0, 0.03);
+ border-top: 1px solid rgba(34, 36, 38, 0.35);
+}
+
+/*-------------------
+ Padded
+--------------------*/
+
+.ui.padded.segment {
+ padding: 1.5em;
+}
+.ui[class*="very padded"].segment {
+ padding: 3em;
+}
+
+/*-------------------
+ Compact
+--------------------*/
+
+.ui.compact.segment {
+ display: table;
+}
+
+/* Compact Group */
+.ui.compact.segments {
+ display: -webkit-inline-box;
+ display: -ms-inline-flexbox;
+ display: inline-flex;
+}
+.ui.compact.segments .segment,
+.ui.segments .compact.segment {
+ display: block;
+ -webkit-box-flex: 0;
+ -ms-flex: 0 1 auto;
+ flex: 0 1 auto;
+}
+
+/*-------------------
+ Circular
+--------------------*/
+
+.ui.circular.segment {
+ display: table-cell;
+ padding: 2em;
+ text-align: center;
+ vertical-align: middle;
+ border-radius: 500em;
+}
+
+/*-------------------
+ Raised
+--------------------*/
+
+.ui.raised.segments,
+.ui.raised.segment {
+ box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15);
+}
+
+
+/*******************************
+ Groups
+*******************************/
+
+
+/* Group */
+.ui.segments {
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ position: relative;
+ margin: 1rem 0em;
+ border: 1px solid rgba(34, 36, 38, 0.15);
+ box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15);
+ border-radius: 0.28571429rem;
+}
+.ui.segments:first-child {
+ margin-top: 0em;
+}
+.ui.segments:last-child {
+ margin-bottom: 0em;
+}
+
+/* Nested Segment */
+.ui.segments > .segment {
+ top: 0px;
+ bottom: 0px;
+ border-radius: 0px;
+ margin: 0em;
+ width: auto;
+ box-shadow: none;
+ border: none;
+ border-top: 1px solid rgba(34, 36, 38, 0.15);
+}
+.ui.segments:not(.horizontal) > .segment:first-child {
+ border-top: none;
+ margin-top: 0em;
+ bottom: 0px;
+ margin-bottom: 0em;
+ top: 0px;
+ border-radius: 0.28571429rem 0.28571429rem 0em 0em;
+}
+
+/* Bottom */
+.ui.segments:not(.horizontal) > .segment:last-child {
+ top: 0px;
+ bottom: 0px;
+ margin-top: 0em;
+ margin-bottom: 0em;
+ box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), none;
+ border-radius: 0em 0em 0.28571429rem 0.28571429rem;
+}
+
+/* Only */
+.ui.segments:not(.horizontal) > .segment:only-child {
+ border-radius: 0.28571429rem;
+}
+
+/* Nested Group */
+.ui.segments > .ui.segments {
+ border-top: 1px solid rgba(34, 36, 38, 0.15);
+ margin: 1rem 1rem;
+}
+.ui.segments > .segments:first-child {
+ border-top: none;
+}
+.ui.segments > .segment + .segments:not(.horizontal) {
+ margin-top: 0em;
+}
+
+/* Horizontal Group */
+.ui.horizontal.segments {
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: row;
+ flex-direction: row;
+ background-color: transparent;
+ border-radius: 0px;
+ padding: 0em;
+ background-color: #EBEBEB;
+ box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15);
+ margin: 1rem 0em;
+ border-radius: 0.28571429rem;
+ border: 1px solid rgba(34, 36, 38, 0.15);
+}
+
+/* Nested Horizontal Group */
+.ui.segments > .horizontal.segments {
+ margin: 0em;
+ background-color: transparent;
+ border-radius: 0px;
+ border: none;
+ box-shadow: none;
+ border-top: 1px solid rgba(34, 36, 38, 0.15);
+}
+
+/* Horizontal Segment */
+.ui.horizontal.segments > .segment {
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
+ -ms-flex: 1 1 0px;
+
+/* Solves #2550 MS Flex */
+ margin: 0em;
+ min-width: 0px;
+ background-color: transparent;
+ border-radius: 0px;
+ border: none;
+ box-shadow: none;
+ border-left: 1px solid rgba(34, 36, 38, 0.15);
+}
+
+/* Border Fixes */
+.ui.segments > .horizontal.segments:first-child {
+ border-top: none;
+}
+.ui.horizontal.segments > .segment:first-child {
+ border-left: none;
+}
+
+
+/*******************************
+ States
+*******************************/
+
+
+/*--------------
+ Disabled
+---------------*/
+
+.ui.disabled.segment {
+ opacity: 0.45;
+ color: rgba(40, 40, 40, 0.3);
+}
+
+/*--------------
+ Loading
+---------------*/
+
+.ui.loading.segment {
+ position: relative;
+ cursor: default;
+ pointer-events: none;
+ text-shadow: none !important;
+ color: transparent !important;
+ -webkit-transition: all 0s linear;
+ transition: all 0s linear;
+}
+.ui.loading.segment:before {
+ position: absolute;
+ content: '';
+ top: 0%;
+ left: 0%;
+ background: rgba(255, 255, 255, 0.8);
+ width: 100%;
+ height: 100%;
+ border-radius: 0.28571429rem;
+ z-index: 100;
+}
+.ui.loading.segment:after {
+ position: absolute;
+ content: '';
+ top: 50%;
+ left: 50%;
+ margin: -1.5em 0em 0em -1.5em;
+ width: 3em;
+ height: 3em;
+ -webkit-animation: segment-spin 0.6s linear;
+ animation: segment-spin 0.6s linear;
+ -webkit-animation-iteration-count: infinite;
+ animation-iteration-count: infinite;
+ border-radius: 500rem;
+ border-color: #54595B rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1);
+ border-style: solid;
+ border-width: 0.2em;
+ box-shadow: 0px 0px 0px 1px transparent;
+ visibility: visible;
+ z-index: 101;
+}
+@-webkit-keyframes segment-spin {
+ from {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ to {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+@keyframes segment-spin {
+ from {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ to {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+
+/*******************************
+ Variations
+*******************************/
+
+
+/*-------------------
+ Basic
+--------------------*/
+
+.ui.basic.segment {
+ background: none transparent;
+ box-shadow: none;
+ border: none;
+ border-radius: 0px;
+}
+
+/*-------------------
+ Clearing
+--------------------*/
+
+.ui.clearing.segment:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+/*-------------------
+ Colors
+--------------------*/
+
+
+/* Red */
+.ui.red.segment:not(.inverted) {
+ border-top: 2px solid #E24614;
+}
+.ui.inverted.red.segment {
+ background-color: #E24614 !important;
+ color: #EBEBEB !important;
+}
+
+/* Orange */
+.ui.orange.segment:not(.inverted) {
+ border-top: 2px solid #F2711C;
+}
+.ui.inverted.orange.segment {
+ background-color: #F2711C !important;
+ color: #EBEBEB !important;
+}
+
+/* Yellow */
+.ui.yellow.segment:not(.inverted) {
+ border-top: 2px solid #DBA915;
+}
+.ui.inverted.yellow.segment {
+ background-color: #DBA915 !important;
+ color: #EBEBEB !important;
+}
+
+/* Olive */
+.ui.olive.segment:not(.inverted) {
+ border-top: 2px solid #B5CC18;
+}
+.ui.inverted.olive.segment {
+ background-color: #B5CC18 !important;
+ color: #EBEBEB !important;
+}
+
+/* Green */
+.ui.green.segment:not(.inverted) {
+ border-top: 2px solid #BFD02C;
+}
+.ui.inverted.green.segment {
+ background-color: #BFD02C !important;
+ color: #EBEBEB !important;
+}
+
+/* Teal */
+.ui.teal.segment:not(.inverted) {
+ border-top: 2px solid #283F4E;
+}
+.ui.inverted.teal.segment {
+ background-color: #283F4E !important;
+ color: #EBEBEB !important;
+}
+
+/* Blue */
+.ui.blue.segment:not(.inverted) {
+ border-top: 2px solid #38A6D8;
+}
+.ui.inverted.blue.segment {
+ background-color: #38A6D8 !important;
+ color: #EBEBEB !important;
+}
+
+/* Violet */
+.ui.violet.segment:not(.inverted) {
+ border-top: 2px solid #6435C9;
+}
+.ui.inverted.violet.segment {
+ background-color: #6435C9 !important;
+ color: #EBEBEB !important;
+}
+
+/* Purple */
+.ui.purple.segment:not(.inverted) {
+ border-top: 2px solid #852EB7;
+}
+.ui.inverted.purple.segment {
+ background-color: #852EB7 !important;
+ color: #EBEBEB !important;
+}
+
+/* Pink */
+.ui.pink.segment:not(.inverted) {
+ border-top: 2px solid #E03997;
+}
+.ui.inverted.pink.segment {
+ background-color: #E03997 !important;
+ color: #EBEBEB !important;
+}
+
+/* Brown */
+.ui.brown.segment:not(.inverted) {
+ border-top: 2px solid #A5673F;
+}
+.ui.inverted.brown.segment {
+ background-color: #A5673F !important;
+ color: #EBEBEB !important;
+}
+
+/* Grey */
+.ui.grey.segment:not(.inverted) {
+ border-top: 2px solid #54595B;
+}
+.ui.inverted.grey.segment {
+ background-color: #54595B !important;
+ color: #EBEBEB !important;
+}
+
+/* Black */
+.ui.black.segment:not(.inverted) {
+ border-top: 2px solid #262626;
+}
+.ui.inverted.black.segment {
+ background-color: #262626 !important;
+ color: #EBEBEB !important;
+}
+
+/*-------------------
+ Aligned
+--------------------*/
+
+.ui[class*="left aligned"].segment {
+ text-align: left;
+}
+.ui[class*="right aligned"].segment {
+ text-align: right;
+}
+.ui[class*="center aligned"].segment {
+ text-align: center;
+}
+
+/*-------------------
+ Floated
+--------------------*/
+
+.ui.floated.segment,
+.ui[class*="left floated"].segment {
+ float: left;
+ margin-right: 1em;
+}
+.ui[class*="right floated"].segment {
+ float: right;
+ margin-left: 1em;
+}
+
+/*-------------------
+ Inverted
+--------------------*/
+
+.ui.inverted.segment {
+ border: none;
+ box-shadow: none;
+}
+.ui.inverted.segment,
+.ui.primary.inverted.segment {
+ background: #262626;
+ color: rgba(255, 255, 255, 0.9);
+}
+
+/* Nested */
+.ui.inverted.segment .segment {
+ color: #262626;
+}
+.ui.inverted.segment .inverted.segment {
+ color: rgba(255, 255, 255, 0.9);
+}
+
+/* Attached */
+.ui.inverted.attached.segment {
+ border-color: #555555;
+}
+
+/*-------------------
+ Emphasis
+--------------------*/
+
+
+/* Secondary */
+.ui.secondary.segment {
+ background: #F3F4F5;
+ color: rgba(0, 0, 0, 0.6);
+}
+.ui.secondary.inverted.segment {
+ background: #595959 -webkit-linear-gradient(rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 100%);
+ background: #595959 linear-gradient(rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 100%);
+ color: rgba(255, 255, 255, 0.8);
+}
+
+/* Tertiary */
+.ui.tertiary.segment {
+ background: #DCDDDE;
+ color: rgba(0, 0, 0, 0.6);
+}
+.ui.tertiary.inverted.segment {
+ background: #7f7f7f -webkit-linear-gradient(rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.35) 100%);
+ background: #7f7f7f linear-gradient(rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.35) 100%);
+ color: rgba(255, 255, 255, 0.8);
+}
+
+/*-------------------
+ Attached
+--------------------*/
+
+
+/* Middle */
+.ui.attached.segment {
+ top: 0px;
+ bottom: 0px;
+ border-radius: 0px;
+ margin: 0em -1px;
+ width: calc(100% + 2px );
+ max-width: calc(100% + 2px );
+ box-shadow: none;
+ border: 1px solid #D4D4D5;
+}
+.ui.attached:not(.message) + .ui.attached.segment:not(.top) {
+ border-top: none;
+}
+
+/* Top */
+.ui[class*="top attached"].segment {
+ bottom: 0px;
+ margin-bottom: 0em;
+ top: 0px;
+ margin-top: 1rem;
+ border-radius: 0.28571429rem 0.28571429rem 0em 0em;
+}
+.ui.segment[class*="top attached"]:first-child {
+ margin-top: 0em;
+}
+
+/* Bottom */
+.ui.segment[class*="bottom attached"] {
+ bottom: 0px;
+ margin-top: 0em;
+ top: 0px;
+ margin-bottom: 1rem;
+ box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15), none;
+ border-radius: 0em 0em 0.28571429rem 0.28571429rem;
+}
+.ui.segment[class*="bottom attached"]:last-child {
+ margin-bottom: 0em;
+}
+
+/*-------------------
+ Size
+--------------------*/
+
+.ui.mini.segments .segment,
+.ui.mini.segment {
+ font-size: 0.78571429rem;
+}
+.ui.tiny.segments .segment,
+.ui.tiny.segment {
+ font-size: 0.85714286rem;
+}
+.ui.small.segments .segment,
+.ui.small.segment {
+ font-size: 0.92857143rem;
+}
+.ui.segments .segment,
+.ui.segment {
+ font-size: 1rem;
+}
+.ui.large.segments .segment,
+.ui.large.segment {
+ font-size: 1.14285714rem;
+}
+.ui.big.segments .segment,
+.ui.big.segment {
+ font-size: 1.28571429rem;
+}
+.ui.huge.segments .segment,
+.ui.huge.segment {
+ font-size: 1.42857143rem;
+}
+.ui.massive.segments .segment,
+.ui.massive.segment {
+ font-size: 1.71428571rem;
+}
+
+
+/*******************************
+ Theme Overrides
+*******************************/
+
+
+
+/*******************************
+ Site Overrides
+*******************************/
+