Browse Source

Continuing to fix tertiary buttons

Former-commit-id: 6ed0ee6c3a
Former-commit-id: 4cb44523fe
pull/258/head
Jack Lukic 12 years ago
parent
commit
4d1b784939
8 changed files with 118 additions and 7 deletions
  1. 2
      build/minified/elements/button.min.css
  2. 2
      build/packaged/semantic.min.css.REMOVED.git-id
  3. 11
      build/uncompressed/elements/button.css
  4. 8
      node/src/documents/elements/button.html
  5. 11
      node/src/files/components/semantic/elements/button.css
  6. 42
      node/src/files/javascript/button.js
  7. 37
      node/src/files/javascript/menu.js
  8. 12
      src/elements/button.less

2
build/minified/elements/button.min.css
File diff suppressed because it is too large
View File

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

@ -1 +1 @@
f38ae02aede631ee4550bce5bb74b32b9175b0c9
d7f2778c9a08d8ddbeacf2162df834cae1a0f79f

11
build/uncompressed/elements/button.css

@ -474,6 +474,17 @@
.ui.buttons.tertiary .button:first-child { .ui.buttons.tertiary .button:first-child {
border-left: none; border-left: none;
} }
.ui.button.tertiary.active {
opacity: 0.9 !important;
}
.ui.button.tertiary.hover,
.ui.button.tertiary:hover {
opacity: 0.8 !important;
}
.ui.button.tertiary.down,
.ui.button.tertiary:active {
opacity: 1 !important;
}
/*-------------- /*--------------
Labeled Icon Labeled Icon
---------------*/ ---------------*/

8
node/src/documents/elements/button.html

@ -288,10 +288,10 @@ type : 'UI Element'
<div class="example"> <div class="example">
<h4 class="ui header">Ordinality</h4> <h4 class="ui header">Ordinality</h4>
<p>A button can be formatted to appear more or less noticable</p> <p>A button can be formatted to appear more or less noticable</p>
<div class="ui secondary buttons">
<div class="ui red button">One</div>
<div class="ui blue button">Two</div>
<div class="ui green button">Three</div>
<div class="ui teal secondary buttons">
<div class="ui button">One</div>
<div class="ui button">Two</div>
<div class="ui button">Three</div>
</div> </div>
</div> </div>
<div class="another example"> <div class="another example">

11
node/src/files/components/semantic/elements/button.css

@ -474,6 +474,17 @@
.ui.buttons.tertiary .button:first-child { .ui.buttons.tertiary .button:first-child {
border-left: none; border-left: none;
} }
.ui.button.tertiary.active {
opacity: 0.9 !important;
}
.ui.button.tertiary.hover,
.ui.button.tertiary:hover {
opacity: 0.8 !important;
}
.ui.button.tertiary.down,
.ui.button.tertiary:active {
opacity: 1 !important;
}
/*-------------- /*--------------
Labeled Icon Labeled Icon
---------------*/ ---------------*/

42
node/src/files/javascript/button.js

@ -0,0 +1,42 @@
semantic.button = {};
// ready event
semantic.button.ready = function() {
// selector cache
var
$buttons = $('.ui.buttons .button'),
$button = $('.ui.button').not($buttons),
// alias
handler = {
activate: function() {
$(this)
.addClass('active')
.siblings()
.removeClass('active')
;
}
}
;
$buttons
.on('click', handler.activate)
;
$button
.state({
states: {
active: true
}
})
;
};
// attach ready event
$(document)
.ready(semantic.button.ready)
;

37
node/src/files/javascript/menu.js

@ -0,0 +1,37 @@
semantic.table = {};
// ready event
semantic.table.ready = function() {
// selector cache
var
$menuItem = $('.menu a.item, .menu .link.item'),
// alias
handler = {
activate: function() {
if(!$(this).hasClass('dropdown')) {
$(this)
.addClass('active')
.closest('.ui.menu')
.find('.item')
.not($(this))
.removeClass('active')
;
}
}
}
;
$menuItem
.on('click', handler.activate)
;
};
// attach ready event
$(document)
.ready(semantic.table.ready)
;

12
src/elements/button.less

@ -584,7 +584,17 @@
.ui.buttons.tertiary .button:first-child { .ui.buttons.tertiary .button:first-child {
border-left: none; border-left: none;
} }
.ui.button.tertiary.active {
opacity: 0.9 !important;
}
.ui.button.tertiary.hover,
.ui.button.tertiary:hover {
opacity: 0.8 !important;
}
.ui.button.tertiary.down,
.ui.button.tertiary:active {
opacity: 1 !important;
}
/*-------------- /*--------------
Labeled Icon Labeled Icon
---------------*/ ---------------*/

Loading…
Cancel
Save