Browse Source

adds pointing style to dropdown menu, fixes issue with vertical min height in menu

Former-commit-id: cbdda32b53750ae622ed1f62d0801af4219c48bd
Former-commit-id: 38ebff44d4a4197467280fc0c6db9cc98486dcb8
beta
Jack Lukic 12 years ago
parent
commit
bb16f2b77c
  1. 2
      build/minified/collections/menu.min.css
  2. 14
      build/minified/modules/dropdown.js
  3. 2
      build/minified/modules/dropdown.min.css
  4. 2
      build/minified/modules/dropdown.min.js
  5. 1
      build/minified/views/activity-feed.min.css
  6. 104
      build/packaged/modules/behavior/default-text.js
  7. 14
      build/packaged/modules/dropdown.js
  8. 536
      build/packaged/modules/form.js
  9. 2
      build/packaged/semantic.min.css.REMOVED.git-id
  10. 2
      build/packaged/semantic.min.js.REMOVED.git-id
  11. 3
      build/uncompressed/collections/menu.css
  12. 95
      build/uncompressed/modules/dropdown.css
  13. 14
      build/uncompressed/modules/dropdown.js
  14. 110
      build/uncompressed/views/activity-feed.css
  15. 39
      node/src/documents/modules/dropdown.html
  16. 3
      node/src/files/components/semantic/collections/menu.css
  17. 95
      node/src/files/components/semantic/modules/dropdown.css
  18. 14
      node/src/files/components/semantic/modules/dropdown.js
  19. 3
      src/collections/menu.less
  20. 14
      src/modules/dropdown.js
  21. 110
      src/modules/dropdown.less

2
build/minified/collections/menu.min.css

File diff suppressed because one or more lines are too long

14
build/minified/modules/dropdown.js

@ -289,6 +289,11 @@ $.fn.dropdown = function(parameters) {
.show()
;
}
else if(animation.show == 'fade') {
$menu
.fadeIn(150)
;
}
else if(animation.show == 'slide') {
$menu
.clearQueue()
@ -304,7 +309,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
},
hide: function() {
@ -314,6 +319,11 @@ $.fn.dropdown = function(parameters) {
.hide()
;
}
else if(animation.hide == 'fade') {
$menu
.fadeOut(150)
;
}
else if(animation.hide == 'slide') {
$menu
.clearQueue()
@ -329,7 +339,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
}
},

2
build/minified/modules/dropdown.min.css

File diff suppressed because one or more lines are too long

2
build/minified/modules/dropdown.min.js

File diff suppressed because one or more lines are too long

1
build/minified/views/activity-feed.min.css

@ -1 +0,0 @@
.ui.feed .event{overflow:hidden;border-top:1px solid #D9D9D9;padding:11px 9px}.ui.feed .event:first-child{border-top:0}.ui.feed .event .who{float:left;width:35px;height:35px;background:#efefef url(../images/placeholder-tiny.png) no-repeat center center;-webkit-box-shadow:-1px -1px 0 #f0f0f0 inset;-moz-box-shadow:-1px -1px 0 #f0f0f0 inset;box-shadow:-1px -1px 0 #f0f0f0 inset}.ui.feed .event .who img{display:block;width:35px}.ui.feed .event .what{margin-left:50px;font-size:12px;line-height:1.33;color:#555}.ui.feed .event .what p{margin:0;padding:0}.ui.feed .event .what a{font-weight:700}.ui.feed .event .what img{max-width:100%}.ui.feed .event .what .summary{display:block;overflow:hidden;margin:8px 0;background-color:#F6FAFC;border:1px solid #E8F2F7;line-height:1.6;padding:6px 9px;color:#666;text-shadow:0 1px 0 rgba(255,255,255,.8)}.ui.feed .event .what .summary.grey{background-color:#FAFAFA;border:1px solid #EAEAEA;font-weight:700}.ui.feed .event .summary img{float:left;width:75px;margin-right:20px}.ui.feed .event .what .summary p{margin:0 0 10px}.ui.feed .event .what .attached{overflow:hidden;margin:8px 0 0}.ui.feed .event .what .attached img{float:left;margin:0 5px 0 0}.ui.feed .event .what .attached a img{border:1px solid #B2B2B2}.ui.feed .event .what .attached a:hover img{border:1px solid #999}.ui.feed .event .when{float:right;font-size:11px;text-align:right;color:#A1A1A1}.ui.large.feed .who{width:auto;height:auto}.ui.large.feed .who img{width:auto}.ui.large.feed .what{margin-left:70px;font-size:14px;line-height:1.33}.ui.large.feed .what .summary{color:#555}.ui.large.feed .what img{display:block;width:auto}.ui.large.feed .when{font-size:12px}

104
build/packaged/modules/behavior/default-text.js

@ -1,104 +0,0 @@
/* ******************************
Default Text (Form)
Author: Jack Lukic
Notes: First Commit April 08, 2012
Refactored Aug 13, 2012
allows you to set a default text value which will be added and removed on form field focus
****************************** */
;(function ( $, window, document, undefined ) {
$.fn.defaultText = function(parameters) {
var
// overload for shorthand to default value
settings = (typeof parameters == 'string')
? $.extend({}, $.fn.defaultText.settings, { defaultValue: parameters })
: $.extend(true, {}, $.fn.defaultText.settings, parameters)
;
// overload function
if(typeof parameters == 'string') {
parameters = { defaultValue: parameters };
}
$.extend(settings, parameters);
$(this)
.each(function() {
var
$element = $(this),
module = {
checkDefault: function() {
if($element.val().toLowerCase() != settings.defaultValue.toLowerCase()) {
$element.addClass(settings.filledClass);
}
},
placeholder: {
add: function(){
if( $element.filter(settings.disabledClassList).size() === 0 ) {
if( $element.val() == settings.replaceValue ) {
if(settings.alwaysReplace) {
$element
.removeClass(settings.filledClass)
.val($element.attr('last'))
.removeAttr('last')
;
}
else {
$element
.removeClass(settings.filledClass)
.val(settings.defaultValue)
;
}
}
else {
$element
.addClass(settings.filledClass)
;
}
}
},
remove: function() {
if( $element.filter(settings.disabledClassList).size() === 0 ) {
if(settings.alwaysReplace) {
$element
.attr('last', $element.val())
.val(settings.replaceValue)
;
}
else {
if( $element.val().toLowerCase() == settings.defaultValue.toLowerCase() ) {
$element
.val(settings.replaceValue)
;
}
}
}
}
}
}
;
if(settings.defaultValue == 'auto') {
settings.defaultValue = $(this).val();
}
$element
.on('focus', module.placeholder.remove)
.on('blur', module.placeholder.add)
;
// check for user value on load
module.checkDefault();
})
;
return this;
};
$.fn.defaultText.settings = {
defaultValue : 'auto',
replaceValue : '',
alwaysReplace : false,
disabledClassList : '.readonly, .disabled',
filledClass : 'filled'
};
})( jQuery, window , document );

14
build/packaged/modules/dropdown.js

@ -289,6 +289,11 @@ $.fn.dropdown = function(parameters) {
.show()
;
}
else if(animation.show == 'fade') {
$menu
.fadeIn(150)
;
}
else if(animation.show == 'slide') {
$menu
.clearQueue()
@ -304,7 +309,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
},
hide: function() {
@ -314,6 +319,11 @@ $.fn.dropdown = function(parameters) {
.hide()
;
}
else if(animation.hide == 'fade') {
$menu
.fadeOut(150)
;
}
else if(animation.hide == 'slide') {
$menu
.clearQueue()
@ -329,7 +339,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
}
},

536
build/packaged/modules/form.js

@ -1,536 +0,0 @@
/* ******************************
Form Validation Components
Author: Jack Lukic
Notes: First Commit April 08, 2012
Refactored May 28, 2013
Allows you to validate forms based on a form validation object
Form validation objects are bound by either data-validate="" metadata, or form id or name tags
****************************** */
;(function ( $, window, document, undefined ) {
$.fn.form = function(fields, parameters) {
var
$allModules = $(this),
$document = $(document),
settings = $.extend(true, {}, $.fn.form.settings, parameters),
eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace,
selector = $allModules.selector || '',
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
invokedResponse
;
$allModules
.each(function() {
var
$module = $(this),
$group = $(this).find(settings.selector.group),
$field = $(this).find(settings.selector.field),
$errorPrompt = $(this).find(settings.selector.prompt),
formErrors = [],
element = this,
instance = $module.data('module-' + settings.namespace),
namespace = settings.namespace,
metadata = settings.metadata,
className = settings.className,
errors = settings.errors,
module
;
module = {
initialize: function() {
module.verbose('Initializing form validation');
if(fields !== undefined || !$.isEmptyObject(fields) ) {
// attach event handler
if(settings.on == 'submit') {
$module
.on('submit.' + namespace, module.validate.form)
;
}
}
else {
module.error(errors.noFields, $module);
}
},
destroy: function() {
$module
.off(namespace)
;
},
refresh: function() {
$field = $module.find(settings.selector.field);
},
field: {
find: function(identifier) {
module.refresh();
if( $field.filter('#' + identifier).size() > 0 ) {
return $field.filter('#' + identifier);
}
else if( $field.filter('[name="' + identifier +'"]').size() > 0 ) {
return $field.filter('[name="' + identifier +'"]');
}
else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').size() > 0 ) {
return $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]');
}
return $('<input/>');
},
add: {
error: function(field, errors) {
var
$field = module.field.find(field.identifier),
$errorGroup = $field.closest($group),
$errorPrompt = $group.find($errorPrompt),
promptExists = ($errorPrompt.size() !== 0)
;
$errorGroup
.addClass(className.error)
;
if(settings.inlineError) {
// create message container on first invalid validation attempt
if(!promptExists) {
$errorPrompt = $('<div />')
.addClass(className.prompt)
.insertBefore($field)
;
}
// add prompt message
$errorPrompt
.html(errors[0])
.fadeIn(settings.animateSpeed)
;
}
}
},
remove: {
error: function(field) {
var
$field = module.field.find(field.identifier),
$errorGroup = $field.closest($group),
$errorPrompt = $group.find($errorPrompt)
;
$errorGroup
.removeClass(className.error)
;
if(settings.inlineError) {
$errorPrompt.hide();
}
}
}
},
validate: {
form: function(event) {
var
allValid = true
;
// reset errors
formErrors = [];
$.each(fields, function(fieldName, field){
// form is invalid after first bad field, but keep checking
if( !( module.validate.field(field) ) ) {
allValid = false;
}
});
// Evaluate form callbacks
return (allValid)
? $.proxy(settings.onSuccess, this)(event)
: $.proxy(settings.onFailure, this)(formErrors)
;
},
// takes a validation object and returns whether field passes validation
field: function(field) {
var
$field = module.field.find(field.identifier),
fieldValid = true,
fieldErrors = []
;
if(field.rules !== undefined) {
// iterate over all validation types for a certain field
$.each(field.rules, function(index, rule) {
if( !( module.validate.rule(field, rule) ) ) {
module.debug('Field is invalid', field.identifier, rule.type);
fieldErrors.push(rule.prompt);
fieldValid = false;
}
});
}
if(fieldValid) {
module.field.remove.error(field, fieldErrors);
settings.onValid($field);
}
else {
formErrors = formErrors.concat(fieldErrors);
module.field.add.error(field, fieldErrors);
$.proxy(settings.onInvalid, $field)(fieldErrors);
return false;
}
return true;
},
// takes validation rule and returns whether field passes rule
rule: function(field, validation) {
var
$field = module.field.find(field.identifier),
type = validation.type,
value = $field.val(),
bracketRegExp = /\[(.*?)\]/i,
bracket = bracketRegExp.exec(type),
isValid = true,
ancillary,
functionType
;
// if bracket notation is used, pass in extra parameters
if(bracket !== undefined && bracket != null) {
ancillary = bracket[1];
functionType = type.replace(bracket[0], '');
isValid = $.proxy(settings.rules[functionType], $module)(value, ancillary);
}
// normal notation
else {
isValid = (type == 'checked')
? $field.filter(':checked').size() > 0
: settings.rules[type](value)
;
}
return isValid;
}
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else {
settings[name] = value;
}
}
else {
return settings[name];
}
},
internal: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else {
module[name] = value;
}
}
else {
return module[name];
}
},
debug: function() {
if(settings.debug) {
module.performance.log(arguments[0]);
module.debug = Function.prototype.bind.call(console.log, console, settings.moduleName + ':');
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
module.performance.log(arguments[0]);
module.verbose = Function.prototype.bind.call(console.info, console, settings.moduleName + ':');
}
},
error: function() {
module.error = Function.prototype.bind.call(console.log, console, settings.moduleName + ':');
},
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({
'Element' : element,
'Name' : message,
'Execution Time' : executionTime
});
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}
},
display: function() {
var
title = settings.moduleName,
caption = settings.moduleName + ': ' + selector + '(' + $allModules.size() + ' elements)',
totalExecutionTime = 0
;
if(selector) {
title += 'Performance (' + selector + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance);
}
else {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
}
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd();
performance = [];
time = false;
}
}
},
invoke: function(query, passedArguments, context) {
var
maxDepth,
found
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && instance !== undefined) {
query = query.split('.');
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value];
return true;
}
else if( instance[value] !== undefined ) {
found = instance[value];
return true;
}
module.error(errors.method);
return false;
});
}
if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found);
return found.apply(context, passedArguments);
}
return found || false;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
invokedResponse = module.invoke(query);
}
else {
if(instance !== undefined) {
module.destroy();
}
module.initialize();
}
})
;
return (invokedResponse)
? invokedResponse
: this
;
};
$.fn.form.settings = {
// module info
moduleName : 'Validate Form Module',
debug : true,
verbose : false,
namespace : 'validate',
animateSpeed : 150,
inlineError : false,
on: 'submit',
onValid : function() {},
onInvalid : function() {},
onSuccess : function() { return true; },
onFailure : function() { return false; },
metadata : {
validate: 'validate'
},
// errors
errors: {
method : 'The method you called is not defined.',
noFields : 'No validation object specified.'
},
selector : {
group : '.field',
prompt : '.prompt',
field : 'input, textarea, select'
},
className : {
error : 'error',
prompt : 'prompt'
},
defaults: {
firstName: {
identifier : 'first-name',
rules: [
{
type : 'empty',
prompt : 'Please enter your first name'
}
]
},
lastName: {
identifier : 'last-name',
rules: [
{
type : 'empty',
prompt : 'Please enter your last name'
}
]
},
username: {
identifier : 'username',
rules: [
{
type : 'email',
prompt : 'Please enter a username'
}
]
},
email: {
identifier : 'email',
rules: [
{
type : 'empty',
prompt : 'Please enter your email'
},
{
type : 'email',
prompt : 'Please enter a valid email'
}
]
},
password: {
identifier : 'password',
rules: [
{
type : 'empty',
prompt : 'Please enter a password'
},
{
type : 'length[6]',
prompt : 'Your password must be at least 6 characters'
}
]
},
passwordConfirm: {
identifier : 'password-confirm',
rules: [
{
type : 'empty',
prompt : 'Please confirm your password'
},
{
identifier : 'password-confirm',
type : 'match[password]',
prompt : 'Please verify password matches'
}
]
},
terms: {
identifier : 'terms',
rules: [
{
type : 'checked',
prompt : 'You must agree to the terms and conditions'
}
]
}
},
rules: {
empty: function(value) {
return !(value === undefined || '' === value);
},
email: function(value){
var
emailRegExp = new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?")
;
return emailRegExp.test(value);
},
length: function(value, requiredLength) {
return (value !== undefined)
? (value.length >= requiredLength)
: false
;
},
not: function(value, notValue) {
return (value != notValue);
},
maxLength: function(value, maxLength) {
return (value !== undefined)
? (value.length <= maxLength)
: false
;
},
match: function(value, matchingField) {
// use either id or name of field
var
$form = $(this),
matchingValue
;
if($form.find('#' + matchingField).size() > 0) {
matchingValue = $form.find('#' + matchingField).val();
}
else if($form.find('[name=' + matchingField +']').size() > 0) {
matchingValue = $form.find('[name=' + matchingField + ']').val();
}
else if( $form.find('[data-validate="'+ matchingField +'"]').size() > 0 ) {
matchingValue = $form.find('[data-validate="'+ matchingField +'"]').val();
}
return (matchingValue !== undefined)
? ( value.toString() == matchingValue.toString() )
: false
;
},
url: function(value) {
var
urlRegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
;
return urlRegExp.test(value);
}
}
};
})( jQuery, window , document );

2
build/packaged/semantic.min.css.REMOVED.git-id

@ -1 +1 @@
34194f0eaf8e1a02f7a8650efc2b2004058316fc
211bd4ea96501c35862f7cafef4ec4e5eec35098

2
build/packaged/semantic.min.js.REMOVED.git-id

@ -1 +1 @@
8694f596a488424baec02451cec72b421816df36
0756a1626ca9d8d5453b31770e15a0f88482c3f9

3
build/uncompressed/collections/menu.css

@ -1165,6 +1165,9 @@
/*--------------
Sizes
---------------*/
.ui.vertical.menu .item {
min-height: 0em !important;
}
.ui.tiny.menu .item {
font-size: 0.875rem;
padding: 0.5em 0.75em;

95
build/uncompressed/modules/dropdown.css

@ -71,6 +71,9 @@
text-align: left;
-webkit-touch-callout: none;
}
.ui.dropdown .menu .item:before {
display: none;
}
.ui.dropdown .menu .item .icon {
margin-right: 0.75em;
}
@ -107,9 +110,14 @@
Simple
---------------*/
/* Displays without javascript */
.ui.simple.dropdown .menu:before,
.ui.simple.dropdown .menu:after {
display: none;
}
.ui.simple.dropdown .menu {
display: block;
overflow: hidden;
top: 100%;
height: 0px;
width: 0px;
position: absolute;
@ -146,9 +154,9 @@
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0.3125em;
-moz-border-radius: 0.3125em;
border-radius: 0.3125em;
-webkit-border-radius: 0.3125em !important;
-moz-border-radius: 0.3125em !important;
border-radius: 0.3125em !important;
}
.ui.selection.dropdown > .dropdown.icon {
float: right;
@ -156,6 +164,7 @@
}
.ui.selection.dropdown,
.ui.selection.dropdown .menu {
top: 100%;
-webkit-transition: box-shadow 0.2s ease-out;
-moz-transition: box-shadow 0.2s ease-out;
-o-transition: box-shadow 0.2s ease-out;
@ -166,21 +175,99 @@
-webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
-moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
box-shadow: 0px 1px 0px 1px #EEEEEE;
-moz-border-radius: 0px 0px 0.325em 0.325em;
-webkit-border-radius: 0px 0px 0.325em 0.325em;
border-radius: 0px 0px 0.325em 0.325em;
}
.ui.selection.dropdown.visible,
.ui.selection.dropdown:hover,
.ui.selection.dropdown.hover {
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 0.3125em 0.3125em 0em 0em !important;
-moz-border-radius: 0.3125em 0.3125em 0em 0em !important;
border-radius: 0.3125em 0.3125em 0em 0em !important;
}
.ui.selection.dropdown.visible .menu,
.ui.selection.dropdown.hover .menu,
.ui.selection.dropdown:hover .menu {
-webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
-moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
box-shadow: 0px 1px 0px 1px #D3D3D3;
}
/*--------------
Fluid
Fluid
---------------*/
.ui.fluid.dropdown {
display: block;
}
/*--------------
Pointing
---------------*/
.ui.pointing.dropdown .menu {
top: 100%;
margin-top: 0.75em;
-moz-border-radius: 0.325em;
-webkit-border-radius: 0.325em;
border-radius: 0.325em;
}
.ui.pointing.dropdown .menu:after {
position: absolute;
pointer-events: none;
content: " ";
width: 0.5em;
height: 0.5em;
-moz-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
-webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
background-image: none;
background-color: #FFFFFF;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
z-index: 2;
}
.ui.pointing.dropdown .menu .item.active:first-child {
background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -o-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
}
/* Directions */
.ui.pointing.dropdown .menu:after {
top: -0.25em;
left: 50%;
margin: 0em 0em 0em -0.25em;
}
.ui.top.left.pointing.dropdown .menu:after {
top: -0.25em;
left: 1em;
right: auto;
margin: 0em;
}
.ui.top.right.pointing.dropdown .menu:after {
top: -0.25em;
left: auto;
right: 1em;
margin: 0em;
}
.ui.left.pointing.dropdown .menu:after {
top: 1em;
left: -0.25em;
margin-top: -0.25em 0em 0em 0em;
}
.ui.right.pointing.dropdown .menu:after {
top: 1em;
left: auto;
right: -0.25em;
margin-top: -0.25em 0em 0em 0em;
}
/* States */
.ui.pointing.dropdown.visible,
.ui.pointing.dropdown.visible .menu {
-moz-border-radius: 0.325em;
-webkit-border-radius: 0.325em;
border-radius: 0.325em;
}

14
build/uncompressed/modules/dropdown.js

@ -289,6 +289,11 @@ $.fn.dropdown = function(parameters) {
.show()
;
}
else if(animation.show == 'fade') {
$menu
.fadeIn(150)
;
}
else if(animation.show == 'slide') {
$menu
.clearQueue()
@ -304,7 +309,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
},
hide: function() {
@ -314,6 +319,11 @@ $.fn.dropdown = function(parameters) {
.hide()
;
}
else if(animation.hide == 'fade') {
$menu
.fadeOut(150)
;
}
else if(animation.hide == 'slide') {
$menu
.clearQueue()
@ -329,7 +339,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
}
},

110
build/uncompressed/views/activity-feed.css

@ -1,110 +0,0 @@
/*******************************
Activity Feed
*******************************/
/* Who */
.ui.feed .event {
overflow: hidden;
border-top: 1px solid #D9D9D9;
padding: 11px 9px;
}
.ui.feed .event:first-child {
border-top: none;
}
.ui.feed .event .who {
float: left;
width: 35px;
height: 35px;
background: #efefef url(../images/placeholder-tiny.png) no-repeat center center;
-webkit-box-shadow: -1px -1px 0 #f0f0f0 inset;
-moz-box-shadow: -1px -1px 0 #f0f0f0 inset;
box-shadow: -1px -1px 0 #f0f0f0 inset;
}
.ui.feed .event .who img {
display: block;
width: 35px;
}
/* What */
.ui.feed .event .what {
margin-left: 50px;
font-size: 12px;
line-height: 1.33;
color: #555555;
}
.ui.feed .event .what p {
margin: 0px;
padding: 0px;
}
.ui.feed .event .what a {
font-weight: bold;
}
.ui.feed .event .what img {
max-width: 100%;
}
.ui.feed .event .what .summary {
display: block;
overflow: hidden;
margin: 8px 0px;
background-color: #F6FAFC;
border: 1px solid #E8F2F7;
line-height: 1.6;
padding: 6px 9px;
color: #666666;
text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.8);
}
.ui.feed .event .what .summary.grey {
background-color: #FAFAFA;
border: 1px solid #EAEAEA;
font-weight: bold;
}
.ui.feed .event .summary img {
float: left;
width: 75px;
margin-right: 20px;
}
.ui.feed .event .what .summary p {
margin: 0px 0px 10px;
}
.ui.feed .event .what .attached {
overflow: hidden;
margin: 8px 0px 0px;
}
.ui.feed .event .what .attached img {
float: left;
margin: 0px 5px 0px 0px;
}
.ui.feed .event .what .attached a img {
border: 1px solid #B2B2B2;
}
.ui.feed .event .what .attached a:hover img {
border: 1px solid #999999;
}
/* When */
.ui.feed .event .when {
float: right;
font-size: 11px;
text-align: right;
color: #A1A1A1;
}
/* Expanded Style */
.ui.large.feed .who {
width: auto;
height: auto;
}
.ui.large.feed .who img {
width: auto;
}
.ui.large.feed .what {
margin-left: 70px;
font-size: 14px;
line-height: 1.33;
}
.ui.large.feed .what .summary {
color: #555555;
}
.ui.large.feed .what img {
display: block;
width: auto;
}
.ui.large.feed .when {
font-size: 12px;
}

39
node/src/documents/modules/dropdown.html

@ -56,6 +56,7 @@ type : 'UI Module'
</div>
</div>
</div>
<div class="dropdown example">
<h4 class="ui header">Combo Dropdown</h4>
@ -151,6 +152,44 @@ type : 'UI Module'
</div>
</div>
</div>
<div class="dropdown example">
<h4 class="ui header">Pointing Dropdown</h4>
<p>A dropdown menu can be formatted to point to its content</p>
<div class="ui red labeled icon top right pointing dropdown button">
<i class="down settings icon"></i>
<span class="text">Settings</span>
<div class="menu">
<div class="item"><i class="edit icon"></i>Edit</div>
<div class="item"><i class="delete icon"></i>Remove</div>
<div class="item"><i class="hide icon"></i>Hide</div>
</div>
</div>
</div>
<div class="another hover example">
<div class="ui compact tiered purple inverted menu">
<div class="menu">
<a class="active item">
<i class="icon home"></i> Home
</a>
<a class="ui pointing dropdown item">
<i class="icon mail"></i> Messages <i class="dropdown icon"></i>
<div class="menu">
<div class="item"><i class="mail icon"></i>Inbox</div>
<div class="item"><i class="book icon"></i>Archive</div>
</div>
</a>
<a class="item">
<i class="icon community"></i> Browse
</a>
</div>
<div class="sub menu">
<div class="active item">Activity Feed</div>
<div class="item">Profile</div>
<div class="item">Events</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Simple</h4>

3
node/src/files/components/semantic/collections/menu.css

@ -1165,6 +1165,9 @@
/*--------------
Sizes
---------------*/
.ui.vertical.menu .item {
min-height: 0em !important;
}
.ui.tiny.menu .item {
font-size: 0.875rem;
padding: 0.5em 0.75em;

95
node/src/files/components/semantic/modules/dropdown.css

@ -71,6 +71,9 @@
text-align: left;
-webkit-touch-callout: none;
}
.ui.dropdown .menu .item:before {
display: none;
}
.ui.dropdown .menu .item .icon {
margin-right: 0.75em;
}
@ -107,9 +110,14 @@
Simple
---------------*/
/* Displays without javascript */
.ui.simple.dropdown .menu:before,
.ui.simple.dropdown .menu:after {
display: none;
}
.ui.simple.dropdown .menu {
display: block;
overflow: hidden;
top: 100%;
height: 0px;
width: 0px;
position: absolute;
@ -146,9 +154,9 @@
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0.3125em;
-moz-border-radius: 0.3125em;
border-radius: 0.3125em;
-webkit-border-radius: 0.3125em !important;
-moz-border-radius: 0.3125em !important;
border-radius: 0.3125em !important;
}
.ui.selection.dropdown > .dropdown.icon {
float: right;
@ -156,6 +164,7 @@
}
.ui.selection.dropdown,
.ui.selection.dropdown .menu {
top: 100%;
-webkit-transition: box-shadow 0.2s ease-out;
-moz-transition: box-shadow 0.2s ease-out;
-o-transition: box-shadow 0.2s ease-out;
@ -166,21 +175,99 @@
-webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
-moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
box-shadow: 0px 1px 0px 1px #EEEEEE;
-moz-border-radius: 0px 0px 0.325em 0.325em;
-webkit-border-radius: 0px 0px 0.325em 0.325em;
border-radius: 0px 0px 0.325em 0.325em;
}
.ui.selection.dropdown.visible,
.ui.selection.dropdown:hover,
.ui.selection.dropdown.hover {
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 0.3125em 0.3125em 0em 0em !important;
-moz-border-radius: 0.3125em 0.3125em 0em 0em !important;
border-radius: 0.3125em 0.3125em 0em 0em !important;
}
.ui.selection.dropdown.visible .menu,
.ui.selection.dropdown.hover .menu,
.ui.selection.dropdown:hover .menu {
-webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
-moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
box-shadow: 0px 1px 0px 1px #D3D3D3;
}
/*--------------
Fluid
Fluid
---------------*/
.ui.fluid.dropdown {
display: block;
}
/*--------------
Pointing
---------------*/
.ui.pointing.dropdown .menu {
top: 100%;
margin-top: 0.75em;
-moz-border-radius: 0.325em;
-webkit-border-radius: 0.325em;
border-radius: 0.325em;
}
.ui.pointing.dropdown .menu:after {
position: absolute;
pointer-events: none;
content: " ";
width: 0.5em;
height: 0.5em;
-moz-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
-webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
background-image: none;
background-color: #FFFFFF;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
z-index: 2;
}
.ui.pointing.dropdown .menu .item.active:first-child {
background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -o-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
}
/* Directions */
.ui.pointing.dropdown .menu:after {
top: -0.25em;
left: 50%;
margin: 0em 0em 0em -0.25em;
}
.ui.top.left.pointing.dropdown .menu:after {
top: -0.25em;
left: 1em;
right: auto;
margin: 0em;
}
.ui.top.right.pointing.dropdown .menu:after {
top: -0.25em;
left: auto;
right: 1em;
margin: 0em;
}
.ui.left.pointing.dropdown .menu:after {
top: 1em;
left: -0.25em;
margin-top: -0.25em 0em 0em 0em;
}
.ui.right.pointing.dropdown .menu:after {
top: 1em;
left: auto;
right: -0.25em;
margin-top: -0.25em 0em 0em 0em;
}
/* States */
.ui.pointing.dropdown.visible,
.ui.pointing.dropdown.visible .menu {
-moz-border-radius: 0.325em;
-webkit-border-radius: 0.325em;
border-radius: 0.325em;
}

14
node/src/files/components/semantic/modules/dropdown.js

@ -289,6 +289,11 @@ $.fn.dropdown = function(parameters) {
.show()
;
}
else if(animation.show == 'fade') {
$menu
.fadeIn(150)
;
}
else if(animation.show == 'slide') {
$menu
.clearQueue()
@ -304,7 +309,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
},
hide: function() {
@ -314,6 +319,11 @@ $.fn.dropdown = function(parameters) {
.hide()
;
}
else if(animation.hide == 'fade') {
$menu
.fadeOut(150)
;
}
else if(animation.hide == 'slide') {
$menu
.clearQueue()
@ -329,7 +339,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
}
},

3
src/collections/menu.less

@ -1473,6 +1473,9 @@
Sizes
---------------*/
.ui.vertical.menu .item {
min-height: 0em !important;
}
.ui.tiny.menu .item {
font-size: 0.875rem;

14
src/modules/dropdown.js

@ -289,6 +289,11 @@ $.fn.dropdown = function(parameters) {
.show()
;
}
else if(animation.show == 'fade') {
$menu
.fadeIn(150)
;
}
else if(animation.show == 'slide') {
$menu
.clearQueue()
@ -304,7 +309,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
},
hide: function() {
@ -314,6 +319,11 @@ $.fn.dropdown = function(parameters) {
.hide()
;
}
else if(animation.hide == 'fade') {
$menu
.fadeOut(150)
;
}
else if(animation.hide == 'slide') {
$menu
.clearQueue()
@ -329,7 +339,7 @@ $.fn.dropdown = function(parameters) {
;
}
else {
module.errors(error.animation);
module.error(errors.animation);
}
}
},

110
src/modules/dropdown.less

@ -75,7 +75,6 @@
transition: opacity 0.2s ease;
z-index: 11;
}
.ui.dropdown > .dropdown.icon {
width: auto;
}
@ -110,6 +109,9 @@
-webkit-touch-callout: none;
}
.ui.dropdown .menu .item:before {
display: none;
}
.ui.dropdown .menu .item .icon {
margin-right: 0.75em;
}
@ -156,9 +158,14 @@
---------------*/
/* Displays without javascript */
.ui.simple.dropdown .menu:before,
.ui.simple.dropdown .menu:after {
display: none;
}
.ui.simple.dropdown .menu {
display: block;
overflow: hidden;
top: 100%;
height: 0px;
width: 0px;
position: absolute;
@ -202,9 +209,9 @@
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0.3125em;
-moz-border-radius: 0.3125em;
border-radius: 0.3125em;
-webkit-border-radius: 0.3125em !important;
-moz-border-radius: 0.3125em !important;
border-radius: 0.3125em !important;
}
.ui.selection.dropdown > .dropdown.icon {
float: right;
@ -213,6 +220,7 @@
.ui.selection.dropdown,
.ui.selection.dropdown .menu {
top: 100%;
-webkit-transition: box-shadow 0.2s ease-out;
-moz-transition: box-shadow 0.2s ease-out;
-o-transition: box-shadow 0.2s ease-out;
@ -224,14 +232,25 @@
-webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
-moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
box-shadow: 0px 1px 0px 1px #EEEEEE;
-moz-border-radius: 0px 0px 0.325em 0.325em;
-webkit-border-radius: 0px 0px 0.325em 0.325em;
border-radius: 0px 0px 0.325em 0.325em;
}
.ui.selection.dropdown.visible,
.ui.selection.dropdown:hover,
.ui.selection.dropdown.hover {
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 0.3125em 0.3125em 0em 0em !important;
-moz-border-radius: 0.3125em 0.3125em 0em 0em !important;
border-radius: 0.3125em 0.3125em 0em 0em !important;
}
.ui.selection.dropdown.visible .menu,
.ui.selection.dropdown.hover .menu,
.ui.selection.dropdown:hover .menu {
-webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
-moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
@ -239,9 +258,90 @@
}
/*--------------
Fluid
Fluid
---------------*/
.ui.fluid.dropdown {
display: block;
}
/*--------------
Pointing
---------------*/
.ui.pointing.dropdown .menu {
top: 100%;
margin-top: 0.75em;
-moz-border-radius: 0.325em;
-webkit-border-radius: 0.325em;
border-radius: 0.325em;
}
.ui.pointing.dropdown .menu:after {
position: absolute;
pointer-events: none;
content: " ";
width: 0.5em;
height: 0.5em;
-moz-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
-webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
background-image: none;
background-color: #FFFFFF;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
z-index: 2;
}
.ui.pointing.dropdown .menu .item.active:first-child {
background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -o-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
}
/* Directions */
.ui.pointing.dropdown .menu:after {
top: -0.25em;
left: 50%;
margin: 0em 0em 0em -0.25em;
}
.ui.top.left.pointing.dropdown .menu:after {
top: -0.25em;
left: 1em;
right: auto;
margin: 0em;
}
.ui.top.right.pointing.dropdown .menu:after {
top: -0.25em;
left: auto;
right: 1em;
margin: 0em;
}
.ui.left.pointing.dropdown .menu:after {
top: 1em;
left: -0.25em;
margin-top: -0.25em 0em 0em 0em;
}
.ui.right.pointing.dropdown .menu:after {
top: 1em;
left: auto;
right: -0.25em;
margin-top: -0.25em 0em 0em 0em;
}
/* States */
.ui.pointing.dropdown.visible,
.ui.pointing.dropdown.visible .menu {
-moz-border-radius: 0.325em;
-webkit-border-radius: 0.325em;
border-radius: 0.325em;
}
Loading…
Cancel
Save