Permalink
Browse files

feature: Emitter-class added to mdlflux

  • Loading branch information...
MikeMitterer committed Dec 18, 2015
1 parent 09be046 commit e0e494aacf10921f85a535a96bafbc5d23fb4567
@@ -168,7 +168,7 @@
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
min-height: 128px;
min-height: 96px;
padding-left: initial;
border-bottom: 1px solid rgba(213, 213, 213, 0.5);
/* background: <your bg-image> repeat 0 0; */ }
@@ -192,7 +192,6 @@
transition: all 0.3s ease-in-out;
opacity: 1; }
.application.mdl-layout > .mdl-layout__drawer .mdl-navigation .mdl-accordion .mdl-accordion__label {
text-transform: uppercase;
font-weight: 400;
border-bottom: 1px solid rgba(221, 221, 221, 0.1); }
.application.mdl-layout > .mdl-layout__drawer .mdl-navigation .mdl-accordion .mdl-accordion__label .symbol {
@@ -206,7 +205,6 @@
transition: all 0.3s ease-in-out; }
.application.mdl-layout > .mdl-layout__drawer .mdl-navigation .mdl-accordion .mdl-accordion--content .mdl-navigation__link {
padding: 12px 48px 12px 60px;
text-transform: uppercase;
display: block;
font-weight: 600; }
.application.mdl-layout > .mdl-layout__drawer .mdl-navigation .mdl-accordion .mdl-accordion--content .mdl-navigation__link:last-child {

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -22,7 +22,7 @@
$two-col-header-footer-props-shadow-opacity: 0.5 !default;
$two-col-header-footer-props-center-breakpoint: 1280px !default;
$two-col-header-footer-props-title-height: ($layout-header-desktop-row-height * 2) + 0 !default;
$two-col-header-footer-props-title-height: ($layout-header-desktop-row-height * 1.5) + 0 !default;
// If you use this SCSS-file direct - you can define something like this
// to get a pattern-background for your header + footer
@@ -190,7 +190,7 @@ $two-col-header-footer-props-title-height: ($layout-header-desktop-row-height *
}
.mdl-accordion__label {
text-transform : uppercase;
// text-transform : uppercase;
font-weight: 400;
border-bottom: 1px solid rgba(#ddd,0.10);
@@ -205,8 +205,8 @@ $two-col-header-footer-props-title-height: ($layout-header-desktop-row-height *
padding : 0;
.mdl-navigation__link {
//text-transform : uppercase;
padding : 12px 48px 12px 60px;
text-transform : uppercase;
display : block;
font-weight : 600;
View
@@ -60,6 +60,7 @@ part "src/flux/action.dart";
part "src/flux/ActionBusImpl.dart";
part "src/flux/DataStore.dart";
part "src/flux/Dispatcher.dart";
part "src/flux/Emitter.dart";
part "src/flux/mixin.dart";
/// Stock-Action that is emitted by the [Dispatcher.emitChange]-Function
@@ -135,6 +135,13 @@ class MaterialTextfield extends MdlComponent {
/// Updates the components CSS-Classes usually called from [MaterialAttribute] or [MaterialClass]
void update() { _updateClasses(); }
/// If this input field has a validity-check and if this check fails it returns [false]
/// If this input field has NO validity-check or if the check goes OK it returns [true]
bool get isValid => _relaxedInput.validity != null && !_relaxedInput.validity.valid ? false : true;
/// Inverts [isValid]
bool get isNotValid => !isValid;
//- private -----------------------------------------------------------------------------------
void _init() {
@@ -30,7 +30,10 @@ class DataStoreChangedEvent<T extends Action> {
bool get hasNoParam => !hasParam;
}
/// The [DataStore] are responsible for managing business logic and data.
/// The [DataStore]s are responsible for managing business logic and data.
///
/// Business logic CAN be managed by the [DataStore] but in a moderat for.
/// It is recommended to put your BL into other classes like Services or Proxies.
///
/// They're akin to models or collections in MVC systems,
/// but stores may manage more than a single piece of data or a single collection,
@@ -69,16 +72,7 @@ class DataStoreChangedEvent<T extends Action> {
/// }
/// }
///
abstract class DataStore {
StreamController<DataStoreChangedEvent<Action>> _onChange;
Stream<DataStoreChangedEvent<Action>> get onChange {
if (_onChange == null) {
_onChange =
new StreamController<DataStoreChangedEvent<Action>>.broadcast(onCancel: () => _onChange = null);
}
return _onChange.stream;
}
abstract class DataStore extends Emitter {
void fire(final Action action);
}
@@ -68,19 +68,14 @@ part of mdlflux;
/// }
///
abstract class Dispatcher extends DataStore {
// final Logger _logger = new Logger('mdlflux.Dispatcher');
final ActionBus _actionbus;
Dispatcher(this._actionbus) {
Validate.notNull(_actionbus);
}
/// Informs the coupled [DataStore]s about the change
void emitChange({ final Action action: UpdateViewAction }) {
if (_onChange != null && _onChange.hasListener && !_onChange.isClosed) {
_onChange.add(new DataStoreChangedEvent<Action>(action));
}
}
/// Fire an [Action] to the global [ActionBus]
@override
void fire(final Action action) => _actionbus.fire(action);
Oops, something went wrong.

0 comments on commit e0e494a

Please sign in to comment.