text:
package org.killbill.billing.entitlement;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.UUID;

import org.joda.time.DateTime;
import org.killbill.billing.callcontext.InternalCallContext;
import org.killbill.billing.entitlement.api.BlockingState;
import org.killbill.billing.entitlement.api.DefaultBlockingTransitionInternalEvent;
import org.killbill.billing.entitlement.api.DefaultEntitlement;
import org.killbill.billing.entitlement.api.Entitlement;
import org.killbill.billing.entitlement.api.EntitlementApiException;
import org.killbill.billing.entitlement.dao.BlockingStateDao;
import org.killbill.billing.entitlement.engine.core.BlockingTransitionNotificationKey;
import org.killbill.billing.entitlement.engine.core.EntitlementNotificationKey;
import org.killbill.billing.entitlement.engine.core.EntitlementNotificationKeyAction;
import org.killbill.billing.entitlement.engine.core.EntitlementUtils;
import org.killbill.billing.payment.api.PluginProperty;
import org.killbill.billing.platform.api.LifecycleHandlerType;
import org.killbill.billing.platform.api.LifecycleHandlerType.LifecycleLevel;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.CallOrigin;
import org.killbill.billing.util.callcontext.InternalCallContextFactory;
import org.killbill.billing.util.callcontext.TenantContext;
import org.killbill.billing.util.callcontext.UserType;
import org.killbill.billing.util.optimizer.BusOptimizer;
import org.killbill.bus.api.BusEvent;
import org.killbill.bus.api.PersistentBus.EventBusException;
import org.killbill.notificationq.api.NotificationEvent;
import org.killbill.notificationq.api.NotificationQueue;
import org.killbill.notificationq.api.NotificationQueueService;
import org.killbill.notificationq.api.NotificationQueueService.NoSuchNotificationQueue;
import org.killbill.notificationq.api.NotificationQueueService.NotificationQueueAlreadyExists;
import org.killbill.notificationq.api.NotificationQueueService.NotificationQueueHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.collect.ImmutableList;
import com.google.inject.Inject;

public class DefaultEntitlementService implements EntitlementService {

    public static final String NOTIFICATION_QUEUE_NAME = "entitlement-events";

    private static final Logger log = LoggerFactory.getLogger(DefaultEntitlementService.class);

    private final EntitlementInternalApi entitlementInternalApi;
    private final BlockingStateDao blockingStateDao;
    private final BusOptimizer eventBus;
    private final NotificationQueueService notificationQueueService;
    private final EntitlementUtils entitlementUtils;
    private final InternalCallContextFactory internalCallContextFactory;

    private NotificationQueue entitlementEventQueue;

    @Inject
    public DefaultEntitlementService(final EntitlementInternalApi entitlementInternalApi,
                                     final BlockingStateDao blockingStateDao,
                                     final BusOptimizer eventBus,
                                     final NotificationQueueService notificationQueueService,
                                     final EntitlementUtils entitlementUtils,
                                     final InternalCallContextFactory internalCallContextFactory) {
        this.entitlementInternalApi = entitlementInternalApi;
        this.blockingStateDao = blockingStateDao;
        this.eventBus = eventBus;
        this.notificationQueueService = notificationQueueService;
        this.entitlementUtils = entitlementUtils;
        this.internalCallContextFactory = internalCallContextFactory;
    }

    @Override
    public String getName() {
        return KILLBILL_SERVICES.ENTITLEMENT_SERVICE.getServiceName();
    }

    @Override
    public int getRegistrationOrdering() {
        return KILLBILL_SERVICES.ENTITLEMENT_SERVICE.getRegistrationOrdering();
    }

    @LifecycleHandlerType(LifecycleLevel.INIT_SERVICE)
    public void initialize() {
        try {
            final NotificationQueueHandler queueHandler = new NotificationQueueHandler() {
                @Override
                public void handleReadyNotification(final NotificationEvent inputKey, final DateTime eventDateTime, final UUID fromNotificationQueueUserToken, final Long accountRecordId, final Long tenantRecordId) {
                    final InternalCallContext internalCallContext = internalCallContextFactory.createInternalCallContext(tenantRecordId, accountRecordId, "EntitlementQueue", CallOrigin.INTERNAL, UserType.SYSTEM, fromNotificationQueueUserToken);

                    if (inputKey instanceof EntitlementNotificationKey) {
                        final CallContext callContext = internalCallContextFactory.createCallContext(internalCallContext);
                        processEntitlementNotification((EntitlementNotificationKey) inputKey, internalCallContext, callContext);
                    } else if (inputKey instanceof BlockingTransitionNotificationKey) {
                        processBlockingNotification((BlockingTransitionNotificationKey) inputKey, internalCallContext);
                    } else if (inputKey != null) {
                        log.error("Entitlement service received an unexpected event className='{}", inputKey.getClass());
                    } else {
                        log.error("Entitlement service received an unexpected null event");
                    }
                }
            };

            entitlementEventQueue = notificationQueueService.createNotificationQueue(KILLBILL_SERVICES.ENTITLEMENT_SERVICE.getServiceName(),
                                                                                NOTIFICATION_QUEUE_NAME,
                                                                                queueHandler);
        } catch (final NotificationQueueAlreadyExists e) {
            throw new RuntimeException(e);
        }
    }

    private void processEntitlementNotification(final EntitlementNotificationKey key, final InternalCallContext internalCallContext, final CallContext callContext) {
        final Entitlement entitlement;
        try {
            entitlement = entitlementInternalApi.getEntitlementForId(key.getEntitlementId(), internalCallContext);
        } catch (final EntitlementApiException e) {
            log.error("Error retrieving entitlementId='{}'", key.getEntitlementId(), e);
            return;
        }

        if (!(entitlement instanceof DefaultEntitlement)) {
            log.error("Error retrieving entitlementId='{}', unexpected entitlement className='{}'", key.getEntitlementId(), entitlement.getClass().getName());
            return;
        }

        final EntitlementNotificationKeyAction entitlementNotificationKeyAction = key.getEntitlementNotificationKeyAction();
        try {
            if (EntitlementNotificationKeyAction.CHANGE.equals(entitlementNotificationKeyAction) ||
                EntitlementNotificationKeyAction.CANCEL.equals(entitlementNotificationKeyAction)) {
                blockAddOnsIfRequired(key, (DefaultEntitlement) entitlement, callContext, internalCallContext);
            } else if (EntitlementNotificationKeyAction.PAUSE.equals(entitlementNotificationKeyAction)) {
                entitlementInternalApi.pause(key.getBundleId(), internalCallContext.toLocalDate(key.getEffectiveDate()), ImmutableList.<PluginProperty>of(), internalCallContext);
            } else if (EntitlementNotificationKeyAction.RESUME.equals(entitlementNotificationKeyAction)) {
                entitlementInternalApi.resume(key.getBundleId(), internalCallContext.toLocalDate(key.getEffectiveDate()), ImmutableList.<PluginProperty>of(), internalCallContext);
            }
        } catch (final EntitlementApiException e) {
            log.error("Error processing event for entitlementId='{}'", entitlement.getId(), e);
        }
    }

    private void blockAddOnsIfRequired(final EntitlementNotificationKey key, final DefaultEntitlement entitlement, final TenantContext callContext, final InternalCallContext internalCallContext) throws EntitlementApiException {
        final Collection<NotificationEvent> notificationEvents = new ArrayList<NotificationEvent>();
        final Collection<BlockingState> blockingStates = entitlement.computeAddOnBlockingStates(key.getEffectiveDate(), notificationEvents, callContext, internalCallContext);
        // Record the new state first, then insert the notifications to avoid race conditions
        entitlementUtils.setBlockingStatesAndPostBlockingTransitionEvent(blockingStates, entitlement.getBundleId(), internalCallContext);
        for (final NotificationEvent notificationEvent : notificationEvents) {
            recordFutureNotification(key.getEffectiveDate(), notificationEvent, internalCallContext);
        }
    }

    private void recordFutureNotification(final DateTime effectiveDate,
                                          final NotificationEvent notificationEvent,
                                          final InternalCallContext context) {
        try {
            final NotificationQueue subscriptionEventQueue = notificationQueueService.getNotificationQueue(KILLBILL_SERVICES.ENTITLEMENT_SERVICE.getServiceName(),
                                                                                DefaultEntitlementService.NOTIFICATION_QUEUE_NAME);
            subscriptionEventQueue.recordFutureNotification(effectiveDate, notificationEvent, context.getUserToken(), context.getAccountRecordId(), context.getTenantRecordId());
        } catch (final NoSuchNotificationQueue e) {
            throw new RuntimeException(e);
        } catch (final IOException e) {
            throw new RuntimeException(e);
        }
    }

    private void processBlockingNotification(final BlockingTransitionNotificationKey key, final InternalCallContext internalCallContext){
        // Check if the blocking state has been deleted since
        try {
            if (blockingStateDao.getById(key.getBlockingStateId(), internalCallContext) == null) {
                log.debug("BlockingState {} has been deleted, not sending a bus event", key.getBlockingStateId());
                return;
            }
        } catch (final EntitlementApiException e) {
            throw new IllegalStateException(String.format("Unexpected exception when fetching blockingState='%s'", key.getBlockingStateId()), e);
        }

        final BusEvent event = new DefaultBlockingTransitionInternalEvent(key.getBlockableId(),
                                                                          key.getStateName(),
                                                                          key.getService(),
                                                                          key.getEffectiveDate(),
                                                                          key.getBlockingType(),
                                                                          key.isTransitionedToBlockedBilling(),
                                                                          key.isTransitionedToUnblockedBilling(),
                                                                          key.isTransitionedToBlockedEntitlement(),
                                                                          key.isTransitionToUnblockedEntitlement(),
                                                                          internalCallContext.getAccountRecordId(),
                                                                          internalCallContext.getTenantRecordId(),
                                                                          internalCallContext.getUserToken());

        try {
            eventBus.post(event);
        } catch (final EventBusException e) {
            log.warn("Failed to post event {}", event, e);
        }
    }

    @LifecycleHandlerType(LifecycleLevel.START_SERVICE)
    public void start() {
        entitlementEventQueue.startQueue();
    }

    @LifecycleHandlerType(LifecycleLevel.STOP_SERVICE)
    public void stop() throws NoSuchNotificationQueue {
        if (entitlementEventQueue != null) {
            if (!entitlementEventQueue.stopQueue()) {
                log.warn("Timed out while shutting down {} queue: IN_PROCESSING entries might be left behind", entitlementEventQueue.getFullQName());
            }
            notificationQueueService.deleteNotificationQueue(entitlementEventQueue.getServiceName(), entitlementEventQueue.getQueueName());
        }
    }
}


text:
layout: post
title: Sony Smartwatch 3
modified:
categories: smartwatch
excerpt: "Warum ist die Sony SmartWatch 3 unser Favorit? GPS und die generelle Funktionalität haben uns überzeugt. Warum? Lesen Sie weiter unten unseren Testbericht!"
tags: [sony, smartwatch]
permalink: /shop/sony/sony-smartwatch-3/
image:
  feature:
date: 2016-04-06T18:36:46+01:00
---

{% include _toc.html %}

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

# Kurzbeschreibung

Warum ist die Sony SmartWatch 3 unser Favorit? GPS und die generelle Funktionalität haben uns überzeugt. Warum? Lesen Sie weiter unten unseren Testbericht!

Lesen Sie die ausführliche Bewertung weiter unten…

Kaufen 143.99€

# Design von Sony's SmartWatch 3

Das Design gibt es in mehreren Versionen. Von einem eleganten silbernen Armband bis hin zu einem trendigen Lederarmband – das schlichte Design der SmartWatch 3 kommt immer gut an. Manche Nutzer haben jedoch berichtet, dass bei der Variante mit silbernen "Blöcken" manchmal Schmutz in den Rillen hängen bleibt. Ich fand jedoch dass dies nicht sonderlich anders ist als bei "normalen" Uhren mit einer ähnlichen Textur.

Das Display selbst hat eine Auflösung von 320×320 Pixeln welches ein wirklich gutes Bild zaubert. Allerdings sieht es nicht so gut aus wie die von Samsung und Asus verwendete AMOLED Technologie, die sich mittlerweile auf deren neueren Smartwatches findet.

# GPS als Stärke der SmartWatch 3

Der sichere Hauptpunkt von Sony's SmartWatch 3 ist die eingebaute GPS Funktion. Mit ihr kann jeder Läufer oder Sportler generell seinen Standort verfolgen und z.B. mit der Runtastic App seine Wege verfolgen. Der GPS Support für Google Wear ist noch recht neu, aber es gibt bereits einige Apps die von dieser Funktion Nutzen machen und wir können uns sicher sein dass dies auch in Zukunft geschehen wird.

# Technische Daten

Neben GPS hat die SmartWatch 3 aus dem Hause Sony auch eingebautes Wifi, auch wenn noch nicht viele Funktionen dies nutzen (Zukunftsupdates könnten dies ändern). Die Smartwatch hat einen 4GB Speicher eingebaut, was so ziemlich der Durchschnitt für Smartwatches ist. Sie kommt weiterhin mit einem quad-core 1.2GHz Arm A7 Prozessor, welcher sehr effektiv im Vergleich zu anderen Smartwatches ist. Dieser ist vielleicht sogar ein bisschen zu stark für die aktuell verfügbaren Apps, aber dies bietet sicherlich zukunftspotential.

## Batterielaufzeit

Die SmartWatch 3 kommt mit einer starken 420mAh Batterie, welche im Vergleich zu anderen Android Wear Smartwatches ein ziemliches Kraftpaket ist. Hiermit ist bei normalem bis starkem Einsatz eine Lebensdauer von ca. 2 Tagen garantiert.

Eine gute Idee ist auch die Ladung mit einem Micro USB Kabel, sprich es wird kein besonderes Equipment zum Laden benötigt und oft kann einfach das Smartphone-Ladegerät verwendet werden.

## Sicher unterwegs – auch unter Wasser!

Ein anderes interessantes Feature ist die Unterwasser-Tauglichkeit. Sony gibt an dass die SmartWatch 3 IP68 kategorisiert ist, was bedeutet dass es garantiert keinen Schaden bis zu einer Wassertiefe von 2 Metern über einen Zeitraum von einer Stunde gibt. Vergleichbare Smartwatches haben oft "nur" eine IP67 Bewertung, welches 30 Minuten in einer Tiefe von einem Meter garantiert.

# Pro/Contra der SmartWatch 3 von Sony

## Pro

- GPS
- Lange Batterie-Lebensdauer
- Gute Bewertungen für Einsatz im Wasser
- einfache Ladung mit einem Micro-USB Kabel

## Contra

- Der Bildschirm ist gut, aber nicht der Beste
- Kein Pulsmesser
- manche Funktionen im Android Wear System sind derzeit noch in Entwicklung
- Falls Sie dem neuen Smartwatch Trend noch nicht so ganz trauen können Sie einen Blick auf unsere U8 werfen, welches ein günstiges Einsteigermodell darstellt.

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta http-equiv="Expires" content="-1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="No-Cache"/>
    <title th:text="${clientName}"></title>
    <link rel="icon" type="image/x-icon" th:href="${faviconPath}">
    <link href="/resources/mobile.css" rel="stylesheet"/>

                        <input id="inputEmail" type="text" class="ddp-input-type"
                               th:placeholder="#{message.app.oauth.join.email}"/>


text:
module MoneyRails
  module ActiveModel
    class MoneyValidator < ::ActiveModel::Validations::NumericalityValidator
      def validate_each(record, attr, _value)
        reset_memoized_variables!
        @record = record
        @attr = attr

        subunit_attr = @record.class.monetized_attributes[@attr.to_s]

        # WARNING: Currently this is only defined in ActiveRecord extension!
        before_type_cast = :"#{@attr}_money_before_type_cast"
        @raw_value = @record.try(before_type_cast)

        # If raw value is nil and changed subunit is nil, then
        # nil is a assigned value, else we should treat the
        # subunit value as the one assigned.
        if @raw_value.nil? && @record.public_send(subunit_attr)
          subunit_value = @record.public_send(subunit_attr)
          @raw_value = subunit_value.to_f / currency.subunit_to_unit
        end

        return if options[:allow_nil] && @raw_value.nil?

        # Set this before we modify @raw_value below.
        stringy = @raw_value.present? && !@raw_value.is_a?(Numeric)

        if stringy
          # remove currency symbol
          @raw_value = @raw_value.to_s.gsub(symbol, "")
        end

        normalize_raw_value!
        super(@record, @attr, @raw_value)

        if stringy and record_does_not_have_error?
          add_error if
            value_has_too_many_decimal_points or
            thousand_separator_after_decimal_mark or
            invalid_thousands_separation
        end
      end

      private

      def record_does_not_have_error?
        return true unless @record.errors.has_key?(@attr)
        !@record.errors.added?(@attr, :not_a_number)
      end

      def reset_memoized_variables!
        [:currency, :abs_raw_value, :decimal_pieces, :pieces_array].each do |var_name|
          ivar_name = :"@_#{var_name}"
          remove_instance_variable(ivar_name) if instance_variable_defined?(ivar_name)
        end
      end

      def currency
        @_currency ||= @record.public_send("currency_for_#{@attr}")
      end

      def decimal_mark
        currency.decimal_mark || '.'
      end

      def thousands_separator
        currency.thousands_separator || ','
      end

      def symbol
        currency.symbol
      end

      def abs_raw_value
        @_abs_raw_value ||= @raw_value.to_s.sub(/^\s*-/, "").strip
      end

      def add_error
        attr_name = @attr.to_s.tr('.', '_').humanize
        attr_name = @record.class.human_attribute_name(@attr, default: attr_name)

        @record.errors.add(@attr, :invalid_currency,
                           { thousands: thousands_separator,
                             decimal: decimal_mark,
                             currency: abs_raw_value,
                             attribute: attr_name })
      end

      def decimal_pieces
        @_decimal_pieces ||= abs_raw_value.split(decimal_mark)
      end

      def value_has_too_many_decimal_points
        ![1, 2].include?(decimal_pieces.length)
      end

      def pieces_array
        @_pieces_array ||= decimal_pieces[0].split(thousands_separator.presence)
      end

      def thousand_separator_after_decimal_mark
        thousands_separator.present? && decimal_pieces.length == 2 && decimal_pieces[1].include?(thousands_separator)
      end

      def invalid_thousands_separation
        return false if pieces_array.length <= 1
        return true  if pieces_array[0].length > 3
        pieces_array[1..-1].any? do |thousands_group|
          thousands_group.length != 3
        end
      end

      # Remove thousands separators, normalize decimal mark,
      # remove whitespaces and _ (E.g. 99 999 999 or 12_300_200.20)
      def normalize_raw_value!
        # Cache abs_raw_value before normalizing because it's used in
        # many places and relies on the original @raw_value.
        abs_raw_value

        @raw_value = @raw_value.to_s
          .gsub(thousands_separator, '')
          .gsub(decimal_mark, '.')
          .gsub(/[\s_]/, '')
      end
    end
  end
end

# Compatibility with ActiveModel validates method which matches option keys to their validator class
ActiveModel::Validations::MoneyValidator = MoneyRails::ActiveModel::MoneyValidator


text:
package raw.dht;

import org.apache.commons.codec.DecoderException;

/**
 * Objects from this interface should
 * generate a valid {@link DhtID} by
 * applying a single pass of SHA-256
 * to a given input.
 *
 * @author vic
 *
 */
public interface DhtHasher {

	/**
	 * Generate an {@link DhtID} from an
	 * arbitrary byte array.
	 *
	 * @param bytes the byte array to be digested
	 * @return a valid {@link DhtID}
	 */
	public DhtID hashBytes(byte[] bytes);

	/**
	 * Generate an {@link DhtID} from an
	 * arbitrary string.
	 *
	 * @param string a string to be digested
	 * @return a valid {@link DhtID}
	 */
	public DhtID hashString(String string);

	/**
	 * Generate an {@link DhtID} from an
	 * arbitrary hexadecimal string.
	 *
	 * @param string an hexadecimal string to be digested
	 * @return a valid {@link DhtID}
	 * @throws DecoderException if hex is not a valide hexadecimal string
	 */
	public DhtID hashHexString(String hex) throws DecoderException;

	/**
	 * Hashes a {@link DhtID} with a long nonce
	 * value. This method is meant to be used
	 * to verify the proof of continuous work
	 * for a given node.
	 *
	 * @param id a {@link DhtID}
	 * @param nonce a long nonce token
	 * @return a {@link DhtID}
	 */
	public DhtID hashDhtIDwithLongNonce(DhtID id, long nonce);

	/**
	 * @return the number of bytes of an hash generated by {@link DhtHasher}
	 */
	public int hashLength();

}


text:
/* JQM overrides */
.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page {
    width: 720px;
    height: 1280px;
}

.ui-page {
    background: #000000 url(../images/bg-gradient.png) repeat-x left top;
}

.ui-header {
    z-Index: 1;
    height: 200px;
    position: relative;
    background: none;
}

.ui-content {
    width: 720px;
    height: 1080px; /* (1280 - 200) */
    overflow: hidden; /* scroll; visible; auto; hidden; */
}

body {
    margin: 0px;
    overflow: hidden;
    -webkit-user-select: none;
    background-color: #222;
    top: 50%;
    left: 50%;
    position: absolute;
    width: 720px;
    height: 1280px;
    -webkit-box-align: center;
    -webkit-box-pack: center;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    font-family: 'Lato Regular', Helvetica, sans;
/* 320 x 480 */
    -webkit-transform: translate(-50%, -50%) scale(0.4444, 0.375);
}

/* 410 x 730 (for browser) */
@media (min-height: 730px) and (min-width: 410px) {
  body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(0.57, 0.57);}
}
/* 480 x 800 */
@media (min-height: 800px) and (min-width: 480px) {
  body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(0.6666, 0.625);}
}
/* 600 x 989 */
@media (min-height: 989px) and (min-width: 600px) {
  body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(0.8333, 0.77266); }
}
/* 600 x 1024 */
@media (min-height: 1024px) and (min-width: 600px) {
  body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(0.8333, 0.8);}
}
/* 720 x 1230 */
@media (min-height: 1230px) and (min-width: 720px) {
  body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(1.0, 0.9609);}
}
/* 720 x 1280 */
@media (min-height: 1280px) and (min-width: 720px) {
  body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(1.0, 1.0);}
}

/************ ui-header *************/
.ui-header .greeting {
    float: left;
    position: relative;
    width: 100%;
    height: 60px;
    margin-left: 40px;
    margin-top: 0px;
}

.ui-header .greeting .month {
    float: left;
    width: 300px;
    font-family: 'Lato Light';
    color: #ffffff;
    font-size: 54px;
    text-transform: lowercase;
    letter-spacing: 0px;
    margin-top: 20px;
}

.ui-header .greeting .year {
    float: left;
    width: 200px;
    font-family: 'Lato Regular';
    color: #ffffff;
    font-size: 38px;
    margin-left: 20px;
    letter-spacing: 0px;
    margin-top: 35px;
}

.ui-header .greeting .welcome {
    font-size: 0px;
}

.ui-header .logo {
    float: left;
    background: url(../images/todo-logo.png) no-repeat top left;
    display: block;
    height: 116px;
    width: 157px;
    margin-left: 80px;
    margin-top: 0px;
}

.ui-header .buttons {
    float: left;
    margin-left: 0px;
    margin-top: 15px;
}

.ui-header .buttons ul {
    list-style-type: none;
}

.ui-header .buttons ul li {
    float: left;
    margin: 0 30px;
}

.ui-header .buttons ul img {
    width: 85px;
    height: 85px;
}

/************** Week view - Day *****************/
/* #week-view {
    position:fixed;
    z-index:1;
    left:0;
    width:1280px;
}
 */
#week-view #weekouter{
    z-index:1;
    position:absolute;
    width:720px;
    top: 200px;
    overflow:auto;
    height: 1080px;
    }

#week-view #weekouter .days{
    z-index: 1;
    position: absolute;
    margin-left: 20px;
    width: 100%;
}

#week-view #weekouter .days .scrollarea{
    z-index: 1;
    width: 100%;
}
#week-view #weekouter .days .scrollarea .day:first-child {
      margin-top: 0px;
}

#week-view #weekouter .days .scrollarea .day {
    width: 640px; /* (720 - left & right margins) */
    margin-left: 20px;
    margin-top: 15px;
    float: left;
    clear: none;
    background-color: white;
    border-radius: 10px;
}

#week-view #weekouter .days .scrollarea .day .container {
    height: 400px;
      overflow: hidden;
    background-color: #D1ECFF;
    border-radius: 10px;
}
.view_more {
    height: 80px;
    border-radius: 3px;
    margin-left: 280px; /* (day width/2 - half width of more icon) */
}

#week-view #weekouter .days .scrollarea  .day .container .items {
    width: 100%;
    /* height: 334px; (400 - header height) */
    overflow: hidden;
    border-radius: 0px 0px 10px 10px;
    background-image: url(../images/box-corner-left-bottom.png),
             url(../images/box-corner-right-bottom.png),
             url(../images/box-corner-left-middle.png),
             url(../images/box-corner-right-middle.png),
             url(../images/box-corner-middle-bottom.png);
    background-position: left bottom, right bottom, left top, right top;
    background-repeat: no-repeat, no-repeat, repeat-y, repeat-y, repeat-x;
}

#week-view #weekouter .days .scrollarea  .day .container .header {
    height: 66px;
    border-radius: 10px 10px 0px 0px;
    background-image: url(../images/box-corner-left-top.png),
             url(../images/box-corner-right-top-tab.png),
             url(../images/box-corner-middle-top.png);
    background-position: left top, right top, left top;
    background-repeat: no-repeat, no-repeat, repeat-x;
}

#day-view .day .container .items .todo-item {
    position: absolute;
    float: left;
    height: 65px;
    width: 1135px;
    margin-top: 15px;
    margin-left: 15px;
}

#week-view #weekouter .days .scrollarea .day .container .items .todo-item {
    position: relative;
    float: left;
    height: 65px;
    width: 1115px;
    margin-top: 15px;
    margin-left: 15px;
}

#week-view #weekouter .days .scrollarea .day .container .items .todo-item img {
    float: left;
    vertical-align: middle;
    width: 65px;
    height: 65px;
    margin-left: 0px;
}

#week-view #weekouter .days .scrollarea .day .container .items .todo-item .text {
    float: left;
    width: 100%;
    cursor: pointer;
    font-family: 'Lato Regular', Helvetica, sans;
    font-size: 32px;
    display: block;
    color: #333333;
    text-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 10px;
    margin-left: 30px;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text {
    max-width: 545px;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item:first-child {
    margin-top: 0px;
}

#week-view #weekouter .days .scrollarea  .day .container .header a.day-view {
    text-decoration: none;
}

#week-view #weekouter .days .scrollarea  .day .container .header .day-of-month {
    font-family: 'Lato Black', Helvetica, sans;
    font-size: 45px;
    text-shadow: none;
    display: inline;
    color: #8C8C8C;
    padding: 0px;
    margin-left: 20px;
}

#week-view #weekouter .days .scrollarea  .day .container .header .day-of-week {
    font-family: 'Lato Light', Helvetica, sans;
    font-size: 45px;
    display: inline-block;
    color: #8C8C8C;
    text-shadow: none;
    text-transform: uppercase;
    margin-left: 10px;
}

#week-view #weekouter .days .scrollarea  .day .container .header .add {
    float: right;
    height: 60px;
    width: 60px;
    margin-top: 12px;
    margin-right: 30px;
    background: url(../images/add-item.png);
    /* vertical-align: middle; */
}

#week-view #weekouter .days .scrollarea .day .container .header .add:active {
    background: url(../images/add-item-active.png);
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item:hover {
      background-color: #e0e0e0;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item.ui-draggable-dragging {
    box-shadow: 0 0 8px 0px #777777;
    background-color: #e0e0e0;
    max-width: 170px;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item.ui-draggable-dragging .text {
    text-overflow: ellipsis;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text.black {
    color: #232323;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text.red {
    color: #FF4040;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text.orange {
    color: #FE9343;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text.green {
    color: #5DB39A;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text.blue {
    color: #63ADEE;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text.grey {
    color: #8C8C8C;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item.prio-1,
#week-view #weekouter .days .scrollarea  .day .container .items .todo-item.prio-2,
#week-view #weekouter .days .scrollarea  .day .container .items .todo-item.prio-3,
#week-view #weekouter .days .scrollarea  .day .container .items .todo-item.prio-4 {
    font-size: 32px;
}

#week-view #weekouter .days .scrollarea  .day .container .items .todo-item .text.done {
    text-decoration: line-through;
}

#week-view #weekouter .days .scrollarea  .day .container.hovered {
    background-color: #d2d2d2;
    border: 2px dashed #888;
}

#day-view .day .container .items .todo-item {
    position: absolute;
    float: left;
    height: 65px;
    width: 100%;
    margin-top: 15px;
    margin-left: 15px;
}
#day-view .day .container .items .todo-item:first-child {
    margin-top: 0px;
}

#day-view .day .container .items .todo-item .text {
    max-width: 485px; /* (560-75) */
}

#day-view .day .container .items .todo-item img {
    float: left;
    vertical-align: middle;
    width: 65px;
    height: 65px;
    margin-left: 0px;
}

#day-view .day .container .items .todo-item .text {
    position: absolute;
    float: left;
    width: 100%;
    cursor: pointer;
    font-family: 'Lato Regular', Helvetica, sans;
    font-size: 32px;
    display: block;
    color: #333333;
    text-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 10px;
    margin-left: 80px;
}

/**********************************************/

#dayouter{
    z-index:1;
    position:relative;
    float:left;
    width:720px;
    overflow:auto;
    height: 1080px;
    padding: 0px;
    }

#day-view .day .container .header a.day-view {
    text-decoration: none;
}

#day-view .day .container .header .day-of-month {
    font-family: 'Lato Black', Helvetica, sans;
    font-size: 45px;
    text-shadow: none;
    display: inline;
    color: #8C8C8C;
    padding: 0px;
    margin-left: 20px;
}

#day-view .day .container .header .day-of-week {
    font-family: 'Lato Light', Helvetica, sans;
    font-size: 45px;
    display: inline-block;
    color: #8C8C8C;
    text-shadow: none;
    text-transform: uppercase;
    margin-left: 10px;
}

#day-view .day .container .header .add {
    float: right;
    height: 60px;
      width: 60px;
    margin-top: 12px;
    margin-right: 30px;
    background: url(../images/add-item.png);
    /* vertical-align: middle; */
}

#day-view .day .container .header .add:active {
      background: url(../images/add-item-active.png);
}

#day-view .day .container .items .todo-item:hover {
      background-color: #e0e0e0;
}

#day-view .day .container .items .todo-item.ui-draggable-dragging {
    box-shadow: 0 0 8px 0px #777777;
    background-color: #e0e0e0;
    max-width: 170px;
}

#day-view .day .container .items .todo-item.ui-draggable-dragging .text {
    text-overflow: ellipsis;
}

#day-view .day .container .items .todo-item .text.black {
    color: #232323;
}

#day-view .day .container .items .todo-item .text.red {
    color: #FF4040;
}

#day-view .day .container .items .todo-item .text.orange {
    color: #FE9343;
}

#day-view .day .container .items .todo-item .text.green {
    color: #5DB39A;
}

#day-view .day .container .items .todo-item .text.blue {
    color: #63ADEE;
}

#day-view .day .container .items .todo-item .text.grey {
    color: #8C8C8C;
}

#day-view .day .container .items .todo-item.prio-1,
#day-view .day .container .items .todo-item.prio-2,
#day-view .day .container .items .todo-item.prio-3,
#day-view .day .container .items .todo-item.prio-4 {
    font-size: 32px;
}

#day-view .day .container .items .todo-item .text.done {
    text-decoration: line-through;
}

#day-view .day .container .hovered {
    background-color: #d2d2d2;
    border: 2px dashed #888;
}

/**********************************************/

/* web-ui-fw overrides */
.ui-popupwindow {
    position: absolute;
    /* background: white; */
    background-color: #D1ECFF;
    width: 660px;
    height: 1080px;
    padding: 0px;
    margin-top: 65px;
    margin-left:10px;
    border-radius: 0.4em;
    z-index: 10;
}

.ui-popupwindow .ui-popupwindow-container-inner {
    padding: 0px;
}
/*edit-item - Common start*/
#edit-item {
    background-color: #D1ECFF;
    border-radius: 0.4em;
}

#edit-item a,
#edit-item a:active,
#edit-item a:visited,
#edit-item a:hover {
    text-decoration: none;
    color: #000;
}

#edit-item .header {
    height: 66px;
    border-radius: 10px 10px 0px 0px;
    padding: 0px;
    background-image: url(../images/box-corner-left-top.png),
             url(../images/box-corner-right-top-tab.png),
             url(../images/box-corner-middle-top.png);
    background-position: left top, right top, left top;
    background-repeat: no-repeat, no-repeat, repeat-x;
}

#edit-item .header label {
    font-family: 'Lato Light', Helvetica, sans;
    font-size: 45px;
    display: inline-block;
    color: #8C8C8C;
    text-shadow: none;
    text-transform: uppercase;
    margin-left: 10px;
}

#edit-item .edit-item-form {
    height: 893px; /* (1080-66-121) */
    width: 100%;
    background-image: url(../images/box-corner-left-bottom.png),
             url(../images/box-corner-right-bottom.png),
             url(../images/box-corner-left-middle.png),
             url(../images/box-corner-right-middle.png),
             url(../images/box-corner-middle-bottom.png);
    background-position: left bottom, right bottom, left top, right top;
    background-repeat: no-repeat, no-repeat, repeat-y, repeat-y, repeat-x;
}

#edit-item form fieldset {
    float: left;
    /* width: 100%; */
}

#edit-item form fieldset.text {
    float: none;
    margin: 0px;
}

#edit-item form label {
    font-size: 32px;
    font-family: 'Lato Regular';
    color: #666666;
}

#edit-item form input[name="text"] {
    font-size: 32px;
    color: #000000;
    border: 1px solid #000000;
    height: 80px;
    width: 600px;
    margin-left: 20px;
    margin-top: 19px;
}
/*edit-item - Common end*/

/*edit-item - Period start*/
#edit-item form fieldset.period {
    margin-top: 20px;
    margin-left: 25px;
    width: 100%;
}

#edit-item form fieldset.period span {
    vertical-align: middle;
    font-size: 40px;
    color: #000000;
    margin-bottom: 40px;
}

#edit-item form fieldset.period img {
    vertical-align: middle;
    height: 80px;
    width: 80px;
}

#edit-item form fieldset.period ul {
    list-style-type: none;
    -webkit-margin-before: 0em;
    -webkit-margin-after: 0em;
    -webkit-margin-start: -10px;
    -webkit-margin-end: 0px;
    -webkit-padding-start: 0;
    margin-top: 20px;
}
/*edit-item - Period end*/

/*edit-item - Priority start*/
#edit-item form fieldset.priority {
    margin-top: 20px;
    position: relative;
    float: left;
    width: 100%;
    height: 120px;
    left: 25px;
    top: 30px;
}

.prioritybutton {
    position: relative;
    float: left;
    left: 0px;
    top: 10px;
    width: 100px;
    height: 80px;
    vertical-align: middle;
}
/*edit-item - Priority end*/

/*edit-item - Color start*/
#edit-item form fieldset.color {
    margin-top: 40px;
    position: relative;
    float: left;
    width: 100%;
    height: 120px;
    left: 25px;
    top: 40px;
}

.colorbutton {
    position: relative;
    float: left;
    left: 0px;
    top: 10px;
    width: 100px;
    height: 75px;
    vertical-align: middle;
}
/*edit-item - Color end*/

/*edit-item - Close start*/
#edit-item .closeb {
    float: right;
    position: absolute;
    height: 80px;
    width: 80px;
    right: 20px;
    background: url(../images/close-button.png);
    vertical-align: middle;
}

#edit-item .closeb:active {
    background: url(../images/close-button-active.png);
}
/*edit-item - Close End*/

/*edit-item - Save, delete buttons start*/
#edit-item .footer {
    height: 121px;
    width: 100%;
    background-color: #eeeeee;
    border-radius: 0px 0px 10px 10px;
    background-image: url(../images/box-shadow-big.png);
    background-position: center top;
    background-repeat: no-repeat;
}

#edit-item .editui_buttons {
    position: absolute;
    height: 80px;
    bottom: 30px;
    right: 30px;
}

#edit-item .editui_buttons fieldset {
    float: left;
}

#edit-item fieldset.save {
    margin-left: 50px;
}

#edit-item fieldset.save .text,
#edit-item fieldset.delete .text {
    font-size: 45px;
    color: #595959;
    font-family: 'Lato Regular';
    vertical-align: middle;
}

#edit-item fieldset.save img,
#edit-item fieldset.delete img {
    height: 80px;
    width: 80px;
    vertical-align: middle;
}
/*edit-item - Save, delete buttons end*/

/******************** settings-view - start *********************/
#settings-view a,
#settings-view a:active,
#settings-view a:visited,
#settings-view a:hover {
    text-decoration: none;
    color: #000;
}

#settings-view {
    width: 720px; /* (720 - left & right margins) */
    height: 1280px;
    margin-left: 0px;
    margin-top: 0px;
}

#settings-view .container {
    /* float: left; */
    width: 640px;
    height: 1040px;
    border-radius: 10px;
     background-color: #D1ECFF;
     margin-left: 40px;
    margin-top: 0px;
}

#settings-view .container .header {
    height: 66px;
    border-radius: 10px 10px 0px 0px;
    background-image: url(../images/box-corner-left-top.png),
             url(../images/box-corner-right-top.png),
             url(../images/box-corner-middle-top.png);
    background-position: left top, right top, left top;
    background-repeat: no-repeat, no-repeat, repeat-x;
}

#settings-view .container .header .text {
    font-family: 'Lato Light', Helvetica, sans;
    font-size: 45px;
    display: inline-block;
    color: #8C8C8C;
    text-shadow: none;
    text-transform: uppercase;
    margin-left: 10px;
}

#settings-view .container .settings_form {
    height: 974px;
    width: 100%;
    border-radius: 0px 0px 10px 10px;
    background-image: url(../images/box-corner-left-bottom.png),
             url(../images/box-corner-right-bottom.png),
             url(../images/box-corner-left-middle.png),
             url(../images/box-corner-right-middle.png),
             url(../images/box-corner-middle-bottom.png);

    background-position: left bottom, right bottom, left top, right top;
    background-repeat: no-repeat, no-repeat, repeat-y, repeat-y, repeat-x;
}

#settings-view form fieldset {
    float: left;
    width: 100%;
}

#settings-view form fieldset.text {
    float: none;
    margin: 0px;
}

#settings-view form label {
    font-size: 32px;
    font-family: 'Lato Regular';
    color: #666666;
    margin-left: 20px;
}

#settings-view a.close {
    position: absolute;
    top: 0px;
    right: 30px;
}

#settings-view a.close img {
    vertical-align: middle;
    height: 60px;
    width: 60px;
}
#settings-view form fieldset.settings_default_view,
#settings-view form fieldset.settings_sort_item_by {
    margin-top: 60px;
    position: relative;
    float: left;
    width: 100%;
    height: 120px;
    left: 0px;
    top: 0px;
}

#settings_default_view,
#settings_sort_item_by,
#settings_visible_days {
    margin-left: 20px;
}

.default_view_item,.sort_item_by_item {
    position: relative;
    float: left;
    left: 0px;
    top: 20px;
    width: 300px;
    height: 100px;
    vertical-align: middle;
}

#settings-view form fieldset.settings_default_view span,
#settings-view form fieldset.settings_sort_item_by span,
#settings-view form fieldset.settings_visible_days span {
    vertical-align: middle;
    font-size: 40px;
    font-family: 'Lato Regular';
    color: #000000;
}

#settings-view form fieldset.settings_default_view img,
#settings-view form fieldset.settings_sort_item_by img,
#settings-view form fieldset.settings_visible_days img {
    vertical-align: middle;
    height: 80px;
    width: 80px;
}

#settings-view form fieldset.settings_visible_days {
    margin-top: 30px;
    position: relative;
    float: left;
    width: 100%;
    height: 350px;
    left: 0px;
    top: 0px;
}

.visible_days_item {
    position: relative;
    float: left;
    margin-left: 20px;
    left: 0px;
    top: 20px;
    width: 130px;
    height: 150px;
    vertical-align: middle;
}

/**************** Fonts ************************/

/* Fonts */
@font-face {
    font-family: 'Lato Light';
    src: url(../fonts/Lato-Lig.ttf);
}

@font-face {
    font-family: 'Lato Regular';
    src: url(../fonts/Lato-Reg.ttf);
}

@font-face {
    font-family: 'Lato Black';
    src: url(../fonts/Lato-Bla.ttf);
}
/* Variables */
/* Mixins */
.rounded-corners-subtle {
    border-radius: 0.3em;
}

/******************** day view *********************/
#day-view {
    position:absolute;
    width: 720px;
    height: 1280px;
    margin-left: 0px;
    margin-top: 0px;
}

#day-view .day {
    /* float: left; */
/*     margin-left: -15px;
    margin-top: -15px; */
    /* overflow: hidden; */
}

#day-view .day .container {
    position: relative;
    float: left;
    width: 640px;
    height: 1040px;
    border-radius: 10px;
    background-color: #D1ECFF;
    margin-left: 40px;
    margin-top: 0px;
}

#items-morning-wrapper{
    z-index:1;
    position:absolute;
    left: 50px;
    width:590px;
    height:322px;
    overflow: auto;
    top: 0px;
}

#items-morning-scroller{
    position:absolute;
    width:100%;
}

#items-afternoon-wrapper{
    z-index:1;
    position:absolute;
    left: 50px;
    width:590px;
    overflow:auto;
    height:322px;
}
#items-afternoon-scroller{
    position:absolute;
    width:100%;
}

#items-evening-wrapper{
    z-index:1;
    position:absolute;
    left: 50px;
    width:590px;
    overflow:auto;
    height:318px;
}

#items-evening-scroller{
    position:absolute;
    width:100%;
}

#morningShadeTop {
    background: url(../images/shadow_top.png) left repeat-x;
    position: relative;
    float: left;
    top: -7px;
    width: 91%;
    height: 20px;
    z-index: 2;
    margin-left:55px;
}

#morningShadeBottom {
    background: url(../images/shadow_bottom.png) left repeat-x;
    position: relative;
    float: left;
    top: 282px;
    width: 91%;
    height: 20px;
    z-index: 2;
    margin-left:55px;
}

#afternoonShadeTop {
    background: url(../images/shadow_top.png) left repeat-x;
    position: relative;
    float: left;
    top: -2px;
    width: 91%;
    height: 20px;
    z-index: 2;
    margin-left:55px;
}

#afternoonShadeBottom {
    background: url(../images/shadow_bottom.png) left repeat-x;
    position: relative;
    float: left;
    top: 282px;
    width: 91%;
    height: 20px;
    z-index: 2;
    margin-left:55px;
}

#eveningShadeTop {
    background: url(../images/shadow_top.png) left repeat-x;
    position: relative;
    float: left;
    top: -2px;
    width: 91%;
    height: 20px;
    z-index: 2;
    margin-left:55px;
}

#eveningShadeBottom {
    background: url(../images/shadow_bottom.png) left repeat-x;
    position: relative;
    float: left;
    top: 280px;
    width: 91%;
    height: 20px;
    z-index: 2;
    margin-left:55px;
}

#day-view .day .container > .header {
    height: 66px;
    width: 100%;
    border-radius: 10px 10px 0px 0px;
    background-image: url(../images/box-corner-day-left-top.png),
             url(../images/box-corner-right-top-tab.png),
             url(../images/box-corner-middle-top.png);
    background-position: left top, right top, left top;
    background-repeat: no-repeat, no-repeat, repeat-x;
}

#day-view .day .container .dayview-content {
    position: relative;
    /* overflow: hidden; */
/*     overflow-y: scroll;
    overflow-x: hidden;
 */
     height: 974px; /* 974px; */ /* (1040-66) */
    width: 100%;
    border-radius: 10px, 10px, 10px, 10px;
    background-color: #D1ECFF;

    background-image: url(../images/box-corner-day-left-bottom.png),
             url(../images/box-corner-right-bottom.png),
             url(../images/box-corner-day-left-middle-dark.png),
             url(../images/box-corner-right-middle.png),
             url(../images/box-corner-middle-bottom.png);

    background-position: left bottom, right bottom, left top, right top, left bottom;
    background-repeat: no-repeat, no-repeat, repeat-y, repeat-y, repeat-x;
}

#day-view .container .dayview-content >.morning,
#day-view .container .dayview-content >.afternoon,
#day-view .container .dayview-content >.evening {
    position: relative;
    float: left;
    width: 100%;
    height: 322px; /* (974/3) */
    border-radius: 10px, 10px, 10px, 10px;
    /* overflow: auto; */
}

#day-view .container .dayview-content >.morning,
#day-view .container .dayview-content >.afternoon {
    border-bottom: 1px solid #b6b5b5;
}

#day-view .container .dayview-content >.morning .header,
#day-view .container .dayview-content >.afternoon .header,
#day-view .container .dayview-content >.evening .header {
/*     position: relative;
    overflow: hidden;
 */
     float: left;
    min-height: 322px;
    width: 50px;
    text-align: center;
    border-radius: 10px 10px 10px 10px;
    vertical-align: middle;

     background: none;
    background-image: none;
}

#day-view .container .dayview-content >.morning .header .text,
#day-view .container .dayview-content >.afternoon .header .text,
#day-view .container .dayview-content >.evening .header .text {
    font-family: 'Lato Light';
    font-size: 30px;
    color: #969696;
    text-shadow: none;
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -o-transform: rotate(-90deg);
    transform: rotate(-90deg);
    display: block;
    position: absolute;
    top: 150px;
    left: 0px;
    width: 50px;
 }

/* #day-view .day-wrap .day .container .dayview-content >.morning .header .a,
#day-view .day-wrap .day .container .dayview-content >.afternoon .header .a,
#day-view .day-wrap .day .container .dayview-content >.evening .header .a {
    position: relative;
    float: right;
    right: 5px;
    width: 22px;
    height: 22px;
} */

#day-view .container .dayview-content >.morning .items,
#day-view .container .dayview-content >.afternoon .items,
#day-view .container .dayview-content >.evening .items {
    position: relative;
    float: left;
    width: 100%; /* (640 - 65) */
    overflow-y: visible;
}

#day-view .container .dayview-content >.morning .items .todo-item,
#day-view .container .dayview-content >.afternoon .items .todo-item,
#day-view .container .dayview-content >.evening .items .todo-item {
    float: left;
    position: relative;
    max-width: 550px;
}

#day-view .container .dayview-content >.morning .items .todo-item.prio-1,
#day-view .container .dayview-content >.afternoon .items .todo-item.prio-1,
#day-view .container .dayview-content >.evening .items .todo-item.prio-1,
#day-view .container .dayview-content >.morning .items .todo-item.prio-2,
#day-view .container .dayview-content >.afternoon .items .todo-item.prio-2,
#day-view .container .dayview-content >.evening .items .todo-item.prio-2,
#day-view .container .dayview-content >.morning .items .todo-item.prio-3,
#day-view .container .dayview-content >.afternoon .items .todo-item.prio-3,
#day-view .container .dayview-content >.evening .items .todo-item.prio-3,
#day-view .container .dayview-content >.morning .items .todo-item.prio-4,
#day-view .container .dayview-content >.afternoon .items .todo-item.prio-4,
#day-view .container .dayview-content >.evening .items .todo-item.prio-4 {
    font-size: 32px;
}

/************ loading screen ******************/
.loading_screen {
    z-Index: 5;
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: url(../images/splash_portrait.png) no-repeat top left;
}

.hidden {
    display: none;
}

/*Move to Date*/

#move-to-date {
    position: absolute;
    width: 680px;
    height: 640px;
    display:none;
    z-Index:2001;
    border-radius: 10px;
    background-color: #D1ECFF;
    left: 20px;
    top: 320px;
}

#move-to-date .header {
    height: 66px;
    border-radius: 10px 10px 0 0;
    padding: 0px;
    background-image: url(../images/box-corner-left-top.png),
             url(../images/box-corner-right-top-tab.png),
             url(../images/box-corner-middle-top.png);
    background-position: left top, right top, left top;
    background-repeat: no-repeat, no-repeat, repeat-x;
}

#move-to-date .header label {
    font-family: 'Lato Light', Helvetica, sans;
    font-size: 45px;
    display: inline-block;
    color: #8C8C8C;
    text-shadow: none;
    text-transform: uppercase;
    margin-left: 10px;
}

#move-to-date .movetodate_form {
    height: 453px; /* (640-66-121) */
    width: 100%;
    background-image: url(../images/box-corner-left-bottom.png),
             url(../images/box-corner-right-bottom.png),
             url(../images/box-corner-left-middle.png),
             url(../images/box-corner-right-middle.png),
             url(../images/box-corner-middle-bottom.png);
    background-position: left bottom, right bottom, left top, right top;
    background-repeat: no-repeat, no-repeat, repeat-y, repeat-y, repeat-x;
}

/*************************************/
#move-to-date form img
{
    margin-right: 10px;
    margin-left: 45px;
}

#move-to-date form label {
    font-size: 42px;
    font-family: 'Lato Regular';
    color: #666666;
    text-align: center;
     margin-left: 40px;
     margin-top: 20px;
}

#move-to-date .container .dateselector {
    height: 510px;
}
#move-to-date .container .dateselector .dateselectortable {
    height: 510px;
    width: 680px;
}
/* #move-to-date .container .dateselector .dateselectortable tr td{
    margin-left: -120px;
}
 */
#move-to-date .container .dateselector .dateselectortable td {
    height: 80px;
}

#move-to-date form label[for="movetodate_dayvalue"]{
    background: #C4D4DF;
}
#move-to-date form label[for="movetodate_monthvalue"]{
    background: #C4D4DF;
}
#move-to-date form label[for="movetodate_yearvalue"]{
    background: #C4D4DF;
}

/*************************************/
#move-to-date a.close {
    position: absolute;
    top: 12px;
    right: 30px;
}

#move-to-date a.close img {
    vertical-align: middle;
    height: 60px;
    width: 60px;
}

#move-to-date .footer {
    height: 121px;
    width: 100%;
    background-color: #eeeeee;
    border-radius: 0px 0px 10px 10px;
    background-image: url(../images/box-shadow-big.png);
    background-position: center top;
    background-repeat: no-repeat;
}

#move-to-date .buttons {
    height: 80px;
    float: right;
    margin-top: 20px;
}

#move-to-date fieldset.save {
    margin-left: 50px;
    vertical-align: middle;
}

#move-to-date fieldset.save .text {
    font-size: 45px;
    color: #595959;
    font-family: 'Lato Regular';
    vertical-align: middle;
}

#move-to-date fieldset.save img {
    height: 80px;
    width: 80px;
    vertical-align: middle;
}

 .opaqueLayer {
    display:none;
    position:absolute;
    top:0px;
    left:0px;
    height: 1280px;
    width: 720px;
    opacity:0.6;
    filter:alpha(opacity=60);
    background-color: #000000;
    z-Index:1000;
}

/* license page */

#licensebtnl {
    position: absolute;
    top: 940px;
    left: 540px;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    -webkit-border-radius: 40px;
    border: solid 3px #000000;
    opacity: 0.3;
    color: #000000;
    font: 35px Arial, Helvetica, sans-serif;
}

#licensebtnl:active {
    opacity: 1.0;
}

#licensepage {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 720px;
    height: 1280px;
    background: -webkit-gradient(linear, left top, right top, from(#3f4140), to(#1d2021));
    z-index: 99;
}

#licensetext {
    width: 98.5%;
    height: 88%;
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #FFFFFF), color-stop(1, #c4ccbc));
    -webkit-border-radius: 12px;
    border-radius: 12px;
    box-shadow: inset 1px 1px 2px 1px black;
    margin-bottom: 2px;
    padding-left: 10px;
    padding-bottom: 10px;
    overflow: hidden;
    cursor: move;
}

#licensescroll {
    position: relative;
    font: 25px/100% Arial, Helvetica, sans-serif;
    text-align: center;
}

.licensebtn {
    position: absolute;
    color: #d7d7d7;
    border: solid 1px #333;
    text-align: center;
    text-decoration: none;
    font: 60px/100% Arial, Helvetica, sans-serif;
    text-shadow: 0 1px 1px rgba(0,0,0,.3);
    -webkit-border-radius: 12px;
    border-radius: 12px;
    background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#000));
    height: 114px;
    width: 114px;
    line-height: 110px;
    cursor: pointer;
    box-shadow: 2px 2px 14px #000;
}

.licensebtn:hover {
    background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#000));
}

.licensebtn:active {
    color: #666;
    background: -webkit-gradient(linear, left top, left bottom, from(#000), to(#444));
}

#licensebtnq {
    left: 160px;
    width: 400px;
}


text:
// pricematch

$(".select-to-price").click(function () {
				$(this).toggleClass("checked");
				var checkedNum = $(".checked").length;
				switch (checkedNum) {
					case 0:
						$(".select-to-price").css("cursor", "pointer");
						$(this).css("cursor", "pointer")
							.find("i")
							.toggleClass("fa-circle-thin")
							.toggleClass("fa-check-circle");
						$(".select-prompt").removeClass("display-none");
						$(".matched-info").addClass("display-none");
						$(".prod-price-in").remove();
						break;

					case 1:
						$(".select-to-price").css("cursor", "pointer");
						$(this).css("cursor", "pointer")
							.find("i")
							.toggleClass("fa-circle-thin")
							.toggleClass("fa-check-circle");
						var ele = $(this).parents(".price-match").find("td"),
							eleLink = ele.eq(0).find("a").attr("href"),
							eleImg = ele.eq(0).html(),
							eleImgSrc = ele.eq(0).find("img").attr("src"),
							eleRetailer = ele.eq(0).find("img").attr("alt"),
							elePrice = ele.eq(1).text();
						elepriceInfo = "
Product price is " + elePrice + " at" + eleImg + "
";

						$("#matched-price").text(elePrice);
						$("#high-retailer-link").attr("href", eleLink);
						$("#high-retailer-img").attr("src", eleImgSrc);

						if ($(this).hasClass("checked")) {
							$(elepriceInfo).insertBefore(".print-prompt");
						} else {
							var ele2 = $(".select-to-price.checked").parents(".price-match").find("td"),
								ele2Link = ele2.eq(0).find("a").attr("href"),
								ele2Img = ele2.eq(0).html(),
								ele2ImgSrc = ele2.eq(0).find("img").attr("src"),
								ele2Retailer = ele2.eq(0).find("img").attr("alt"),
								ele2Price = ele2.eq(1).text();

							$("#matched-price").text(ele2Price);
							$("#high-retailer-link").attr("href", ele2Link);
							$("#high-retailer-img").attr("src", ele2ImgSrc);

							for (var i = 0; i <= 1; i++) {
								var remove1 = ele.eq(0).find("img").attr("alt"),
									remove2 = ele.eq(1).find("img").attr("alt");
								if (eleRetailer == $(".prod-price-in").eq(i).data("retailer-name")) {
									$(".prod-price-in[data-retailer-name=" + eleRetailer + "]").remove();
								}
							}
						}
						$(".select-prompt").addClass("display-none");
						$(".matched-info").removeClass("display-none");

						break;

					case 2:
						var ele = $(this).parents(".price-match").find("td"),
							eleLink = ele.eq(0).find("a").attr("href"),
							eleImg = ele.eq(0).html(),
							eleImgSrc = ele.eq(0).find("img").attr("src"),
							eleRetailer = ele.eq(0).find("img").attr("alt"),
							elePrice = ele.eq(1).text();
						elepriceInfo = "
Product price is " + elePrice + " at" + eleImg + "
";

						// special
						var matching = $(".select-to-price.checked").parents(".price-match"),
							matchingPrice1 = parseFloat(matching.eq(0).find("td").eq(1).find("span").text()),
							matchingPrice2 = parseFloat(matching.eq(1).find("td").eq(1).find("span").text()),
							matchingImgSrc1 = matching.eq(0).find("td").eq(0).find("img").attr("src"),
							matchingImgSrc2 = matching.eq(1).find("td").eq(0).find("img").attr("src"),
							matchingLink1 = matching.eq(0).find("td").eq(0).find("a").attr("href"),
							matchingLink2 = matching.eq(1).find("td").eq(0).find("a").attr("href"),
							matchingRetailer1 = matching.eq(0).find("td").eq(0).find("img").attr("alt"),
							matchingRetailer2 = matching.eq(1).find("td").eq(0).find("img").attr("alt");
						if (matchingPrice1 > matchingPrice2) {

							if (matchingRetailer1 == "bestbuy") {
								$("#matched-price").text("$" + (matchingPrice2 - (matchingPrice1 - matchingPrice2) * 0.1).toFixed(2));
							} else if (matchingRetailer1 == "homedepot") {

								$("#matched-price").text("$" + (matchingPrice2 * 0.9).toFixed(2));
							} else if (matchingRetailer1 == "sears") {
								$("#matched-price").text("$" + (matchingPrice2 * 0.9).toFixed(2));
							} else if (matchingRetailer1 == "visions") {
								$("#matched-price").text("$" + (matchingPrice2 - (matchingPrice1 - matchingPrice2) * 0.15).toFixed(2));
							} else {
								$("#matched-price").text("$" + matchingPrice2);
							}

							$("#high-retailer-link").attr("href", matchingLink1);
							$("#high-retailer-img").attr("src", matchingImgSrc1);

						} else if ((matchingPrice1 < matchingPrice2)) {

							if (matchingRetailer2 == "bestbuy") {
								$("#matched-price").text("$" + (matchingPrice1 - (matchingPrice2 - matchingPrice1) * 0.1).toFixed(2));
							} else if (matchingRetailer2 == "homedepot") {

								$("#matched-price").text("$" + (matchingPrice1 * 0.9).toFixed(2));
							} else if (matchingRetailer2 == "sears") {
								$("#matched-price").text("$" + (matchingPrice1 * 0.9).toFixed(2));
							} else if (matchingRetailer2 == "visions") {
								$("#matched-price").text("$" + (matchingPrice1 - (matchingPrice2 - matchingPrice1) * 0.15).toFixed(2));
							} else {
								$("#matched-price").text("$" + matchingPrice1);
							}

							$("#high-retailer-link").attr("href", matchingLink2);
							$("#high-retailer-img").attr("src", matchingImgSrc2);
						} else {
							$("#matched-price").text(elePrice);
							$("#high-retailer-link").attr("href", eleLink);
							$("#high-retailer-img").attr("src", eleImgSrc);
						}

						$(elepriceInfo).insertBefore(".print-prompt");

						$(".select-to-price:not(.checked)")
							.css("cursor", "not-allowed")
							.removeClass("checked");
						$(".select-to-price").css("cursor", "not-allowed");
						$(".select-to-price.checked").css("cursor", "pointer");
						$(this).find("i")
							.toggleClass("fa-circle-thin")
							.toggleClass("fa-check-circle");

						break;

					default:
						if ($(this).hasClass("checked")) {
							$(this).removeClass("checked");
						}

						$(".select-to-price").css("cursor", "not-allowed");
				}

});

// print temp
				// $(".result-print").click(function () {
				// 	window.print();
				// });

$(".result-print").click(function () {
	$(".modal-contents .prod-price-in").remove();
	$(".modal-contents h3").text($(".result-prod-right").text());
	$(".prod-price-in").eq(1).clone().prependTo(".modal-contents .col-lg-9");
	$(".prod-price-in").eq(0).clone().prependTo(".modal-contents .col-lg-9");
	$(".modal-matched-price span").text($("#matched-price").text());
	$(".modal-matched-retailer").html("Get Matched Price From " + $("#high-retailer-link").html());
	$(".modal-contents .col-lg-3").html($(".result-prod-img").html());
});

/* @license
 * jQuery.print, version 1.4.0
 *  (c) Sathvik Ponangi, Doers' Guild
 * Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
 *--------------------------------------------------------------------------*/
(function ($) {
	"use strict";
	// A nice closure for our definitions
	function getjQueryObject(string) {
		// Make string a vaild jQuery thing
		var jqObj = $("");
		try {
			jqObj = $(string)
				.clone();
		} catch (e) {
			jqObj = $("")
				.html(string);
		}
		return jqObj;
	}

	function printFrame(frameWindow, content, options) {
		// Print the selected window/iframe
		var def = $.Deferred();
		try {
			frameWindow = frameWindow.contentWindow || frameWindow.contentDocument || frameWindow;
			var wdoc = frameWindow.document || frameWindow.contentDocument || frameWindow;
			if(options.doctype) {
				wdoc.write(options.doctype);
			}
			wdoc.write(content);
			wdoc.close();
			setTimeout(function () {
				// Fix for IE : Allow it to render the iframe
				frameWindow.focus();
				try {
					// Fix for IE11 - printng the whole page instead of the iframe content
					if (!frameWindow.document.execCommand('print', false, null)) {
						// document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891
						frameWindow.print();
					}
				} catch (e) {
					frameWindow.print();
				}
				frameWindow.close();
				def.resolve();
			}, options.timeout);
		} catch (err) {
			def.reject(err);
		}
		return def;
	}

	function printContentInIFrame(content, options) {
		var $iframe = $(options.iframe + "");
		var iframeCount = $iframe.length;
		if (iframeCount === 0) {
			// Create a new iFrame if none is given
			$iframe = $('')
				.prependTo('body')
				.css({
					"position": "absolute",
					"top": -999,
					"left": -999
				});
		}
		var frameWindow = $iframe.get(0);
		return printFrame(frameWindow, content, options)
			.done(function () {
				// Success
				setTimeout(function () {
					// Wait for IE
					if (iframeCount === 0) {
						// Destroy the iframe if created here
						$iframe.remove();
					}
				}, 100);
			})
			.fail(function (err) {
				// Use the pop-up method if iframe fails for some reason
				console.error("Failed to print from iframe", err);
				printContentInNewWindow(content, options);
			})
			.always(function () {
				try {
					options.deferred.resolve();
				} catch (err) {
					console.warn('Error notifying deferred', err);
				}
			});
	}

	function printContentInNewWindow(content, options) {
		// Open a new window and print selected content
		var frameWindow = window.open();
		return printFrame(frameWindow, content, options)
			.always(function () {
				try {
					options.deferred.resolve();
				} catch (err) {
					console.warn('Error notifying deferred', err);
				}
			});
	}

	function isNode(o) {
		/* http://stackoverflow.com/a/384380/937891 */
		return !!(typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
	}
	$.print = $.fn.print = function () {
		// Print a given set of elements
		var options, $this, self = this;
		// console.log("Printing", this, arguments);
		if (self instanceof $) {
			// Get the node if it is a jQuery object
			self = self.get(0);
		}
		if (isNode(self)) {
			// If `this` is a HTML element, i.e. for
			// $(selector).print()
			$this = $(self);
			if (arguments.length > 0) {
				options = arguments[0];
			}
		} else {
			if (arguments.length > 0) {
				// $.print(selector,options)
				$this = $(arguments[0]);
				if (isNode($this[0])) {
					if (arguments.length > 1) {
						options = arguments[1];
					}
				} else {
					// $.print(options)
					options = arguments[0];
					$this = $("html");
				}
			} else {
				// $.print()
				$this = $("html");
			}
		}
		// Default options
		var defaults = {
			globalStyles: true,
			mediaPrint: false,
			stylesheet: null,
			noPrintSelector: ".no-print",
			iframe: true,
			append: null,
			prepend: null,
			manuallyCopyFormValues: true,
			deferred: $.Deferred(),
			timeout: 250,
			title: null,
			doctype: '<!doctype html>'
		};
		// Merge with user-options
		options = $.extend({}, defaults, (options || {}));
		var $styles = $("");
		if (options.globalStyles) {
			// Apply the stlyes from the current sheet to the printed page
			$styles = $("style, link, meta, title");
		} else if (options.mediaPrint) {
			// Apply the media-print stylesheet
			$styles = $("link[media=print]");
		}
		if (options.stylesheet) {
			// Add a custom stylesheet if given
			$styles = $.merge($styles, $('<link rel="stylesheet" href="' + options.stylesheet + '">'));
		}
		// Create a copy of the element to print
		var copy = $this.clone();
		// Wrap it in a span to get the HTML markup string
		copy = $("")
			.append(copy);
		// Remove unwanted elements
		copy.find(options.noPrintSelector)
			.remove();
		// Add in the styles
		copy.append($styles.clone());
		// Update title
		if (options.title) {
			var title = $("title", copy);
			if (title.length === 0) {
				title = $("<title />");
				copy.append(title);
			}
			title.text(options.title);
		}
		// Appedned content
		copy.append(getjQueryObject(options.append));
		// Prepended content
		copy.prepend(getjQueryObject(options.prepend));
		if (options.manuallyCopyFormValues) {
			// Manually copy form values into the HTML for printing user-modified input fields
			// http://stackoverflow.com/a/26707753
			copy.find("input")
				.each(function () {
					var $field = $(this);
					if ($field.is("[type='radio']") || $field.is("[type='checkbox']")) {
						if ($field.prop("checked")) {
							$field.attr("checked", "checked");
						}
					} else {
						$field.attr("value", $field.val());
					}
				});
			copy.find("select").each(function () {
				var $field = $(this);
				$field.find(":selected").attr("selected", "selected");
			});
			copy.find("textarea").each(function () {
				// Fix for https://github.com/DoersGuild/jQuery.print/issues/18#issuecomment-96451589
				var $field = $(this);
				$field.text($field.val());
			});
		}
		// Get the HTML markup string
		var content = copy.html();
		// Notify with generated markup & cloned elements - useful for logging, etc
		try {
			options.deferred.notify('generated_markup', content, copy);
		} catch (err) {
			console.warn('Error notifying deferred', err);
		}
		// Destroy the copy
		copy.remove();
		if (options.iframe) {
			// Use an iframe for printing
			try {
				printContentInIFrame(content, options);
			} catch (e) {
				// Use the pop-up method if iframe fails for some reason
				console.error("Failed to print from iframe", e.stack, e.message);
				printContentInNewWindow(content, options);
			}
		} else {
			// Use a new window for printing
			printContentInNewWindow(content, options);
		}
		return this;
	};
})(jQuery);

$("#printable").find('.print').on('click', function() {
	$.print("#printable", {
		noPrintSelector: ".no-print",
	});
});


text:
import LabeledButton from './menuitems/LabeledButton'
import Text from './menuitems/Text'
import AnimatedBar from './menuitems/AnimatedBar'
import Icon from './menuitems/Icon'
import LabeledImage from './menuitems/LabeledImage'
import InputField from './menuitems/InputField'

/**
 * Component that draws menu with given component list and with wanted layout
 */
export default class MenuView {
  constructor ({ game, layout, background, backgroundInTheMiddle }) {
    this.game = game
    this.layout = layout
    this.backgroundInTheMiddle = backgroundInTheMiddle
    this.menuViewGroup = game.add.group()
    this.menuViewGroup.fixedToCamera = true
    this.game.world.bringToTop(this.menuViewGroup)
    this.activeMenuitems = new Map()
    this.createBackground(background)
  }

  /**
   * Creates background image of menu
   */
  createBackground (backgroundAsset) {
    var menuRect = this.layout.menuRect

    if (backgroundAsset != null) {
      var x = menuRect.x
      var y = menuRect.y
      if (this.backgroundInTheMiddle) {
        var aHeight = this.game.cache.getImage(backgroundAsset).height
        var aWidth = this.game.cache.getImage(backgroundAsset).width
        var mHeight = menuRect.height
        var mWidth = menuRect.width

        y = y + (mHeight - aHeight) / 2
        x = x + (mWidth - aWidth) / 2
      }
      this.background = this.game.add.sprite(x, y, backgroundAsset)
      if (menuRect.cropToSize) {
        this.background.crop({x: 0, y: 0, width: menuRect.width, height: menuRect.height})
      }
      this.background.fixedToCamera = true
      this.game.world.moveDown(this.background)
    } else {
      this.background = this.game.make.graphics()
      this.background.beginFill(0x000000, 0.25)
      this.background.drawRoundedRect(
        menuRect.x, menuRect.y, menuRect.width, menuRect.height, 1
      )
      this.background.endFill()
      this.background.fixedToCamera = true
      this.game.add.existing(this.background)
      this.game.world.bringToTop(this.background)
    }
  }

  /**
   * Redraws the menu with given components
   * @param {*} sections
   */
  draw (sections) {
    this.active = new Set()
    this.activeSections = []

    this.activeButtons = []
    this.activeTexts = []
    this.activeInputFields = []

    this.layout.init(sections)
    this.updateMenu(sections)
    this.game.world.bringToTop(this.background)
    this.game.world.bringToTop(this.menuViewGroup)
  }

  /**
   * Iterates through given sections
   * @param {*} sections
   */
  updateMenu (sections) {
    var newSections = new Map()

    for (let i = 0; i < sections.length; i++) {
      var section = sections[i]

      var menuitems = this.activeMenuitems.has(section.name)
        ? this.updateSection(this.activeMenuitems.get(section.name), section.components)
        : this.createSection(section.components)

      this.activeSections.push(menuitems)
      newSections.set(section.name, menuitems)

      if (i !== sections.length - 1) {
        this.layout.afterSection()
      }
    }

    this.removeExtraSections(this.activeMenuitems, newSections)
    this.activeMenuitems = newSections
  }

  /**
   * Iterates through given components in a section
   * @param {*} components
   */
  createSection (components) {
    var menuitems = []
    for (let i = 0; i < components.length; i++) {
      menuitems.push(this.createComponent(components[i]))

      if (i !== components.length - 1) {
        this.layout.afterLine()
      }
    }

    return menuitems
  }

  createComponent (component) {
    var coords = this.layout.nextComponentLocation(component)

    return this.componentFunction(component.type, 'create')
      .call(this, coords, component)
  }

  componentFunction (type, prefix) {
    return this[prefix + type.charAt(0).toUpperCase() + type.slice(1)]
  }

  /**
   * Creates a button with given button action
   * @param {ButtonAction} buttonAction
   */
  createButton (coords, buttonComponent) {
    var button = new LabeledButton({
      game: this.game,
      viewGroup: this.menuViewGroup,
      label: buttonComponent.name,
      fontSize: buttonComponent.fontSize,
      asset: buttonComponent.asset,
      x: coords.x,
      y: coords.y,
      callback: buttonComponent.function,
      context: buttonComponent.context,
      buttonWidth: buttonComponent.width,
      buttonHeight: buttonComponent.height
    })
    this.activeButtons.push(button)
    return button
  }

  createLabeledImage (coords, component) {
    return new LabeledImage({
      game: this.game,
      viewGroup: this.menuViewGroup,
      label: component.text,
      fontSize: component.fontSize,
      asset: component.asset,
      x: coords.x,
      y: coords.y,
      width: component.width,
      height: component.height
    })
  }

  /**
   * Creates a visible text with given text and font size
   * @param {*} text
   * @param {*} fontSize
   * @return { ??? }
   */
  createText (coords, textComponent) {
    var anchor

    if (this.layout.vertical) {
      anchor = {
        x: 0.5,
        y: 0
      }
    } else {
      anchor = {
        x: 0,
        y: 0.5
      }
    }

    var tex = new Text({
      game: this.game,
      component: textComponent,
      menuSize: this.layout.menuRect.width,
      viewGroup: this.menuViewGroup,
      text: textComponent.text,
      fontSize: textComponent.fontSize,
      x: coords.x,
      y: coords.y,
      anchor: anchor
    })

    this.activeTexts.push(tex)
    return tex
  }

  /**
   * Creates a new animated bar to the menu
   * @param {*} animatedBarComponent
   */
  createBar (coords, animatedBarComponent) {
    return new AnimatedBar({
      game: this.game,
      group: this.menuViewGroup,
      vertical: animatedBarComponent.vertical,
      width: animatedBarComponent.width,
      height: animatedBarComponent.height,
      x: coords.x,
      y: coords.y,
      percent: animatedBarComponent.percent
    })
  }

  /**
   * Creates new icon to the menu
   * @param {*} iconComponent
   */
  createIcon (coords, iconComponent) {
    return new Icon({
      game: this.game,
      group: this.menuViewGroup,
      x: coords.x,
      y: coords.y,
      asset: iconComponent.asset
    })
  }

  /**
   * Creates a new input field to the menu
   * @param {Object} inputFieldComponent - contains the input component values.
   */
  createInputField (coords, inputFieldComponent) {
    var infield = new InputField({
      game: this.game,
      viewGroup: this.menuViewGroup,
      x: coords.x,
      y: coords.y,
      parameters: inputFieldComponent.parameters
    })
    this.activeInputFields.push(infield)
    return infield
  }

  updateSection (section, components) {
    var menuitems = []

    var i = 0
    for (let j = 0; j < components.length; j++) {
      var component = components[j]
      var menuitem = section[i]
      if (i < section.length && menuitem.type === component.type) {
        if ((component.type === 'button' || component.type === 'labeledImage') &&
            (component.asset !== menuitem.asset)) {
          menuitems.push(this.createComponent(component))
          menuitem.destroy()
        } else {
          menuitems.push(menuitem)
          this.updateComponent(menuitem, component)
        }
        i++
      } else {
        menuitems.push(this.createComponent(component))
      }

      if (j !== components.length - 1) {
        this.layout.afterLine()
      }
    }

    this.removeExtraMenuitems(section, i)

    return menuitems
  }

  removeExtraMenuitems (section, startIndex) {
    for (let i = section.length - 1; i >= startIndex; i--) {
      section[i].destroy()
      section.pop()
    }
  }

  updateComponent (menuitem, component) {
    var coords = this.layout.nextComponentLocation(component)

    this.componentFunction(component.type, 'update')
      .call(this, coords, component, menuitem)
  }

  updateButton (coords, component, button) {
    button.update(component.name, component.fontSize, coords.x, coords.y,
      component.function, component.context, component.width, component.height)
    this.activeButtons.push(button)
  }

  updateText (coords, component, text) {
    text.update(component, component.text, component.fontSize, coords.x, coords.y)
    this.activeTexts.push(text)
  }

  updateIcon (coords, component, icon) {
    icon.update(coords.x, coords.y)
  }

  updateBar (coords, component, bar) {
    bar.update(coords.x, coords.y, component.percent)
  }

  updateLabeledImage (coords, component, labeledImage) {
    labeledImage.update(component.text, component.fontSize, coords.x, coords.y)
  }

  updateInputField (coords, component, inputField) {
    inputField.update(coords.x, coords.y)
    this.activeInputFields.push(inputField)
  }

  removeExtraSections (oldSections, newSections) {
    for (let key of oldSections.keys()) {
      if (!newSections.has(key)) this.destroySection(oldSections.get(key))
    }
  }

  destroySection (menuitems) {
    for (let menuitem of menuitems) {
      menuitem.destroy()
    }
  }
}


text:
<?php

class Questionnaire extends Model {

}


text:
package org.elasticsearch.search;

import com.google.common.collect.ImmutableList;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.inject.Module;
import org.elasticsearch.common.inject.SpawnModules;
import org.elasticsearch.index.query.functionscore.FunctionScoreModule;
import org.elasticsearch.index.search.morelikethis.MoreLikeThisFetchService;
import org.elasticsearch.search.action.SearchServiceTransportAction;
import org.elasticsearch.search.aggregations.AggregationModule;
import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificantTermsHeuristicModule;
import org.elasticsearch.search.controller.SearchPhaseController;
import org.elasticsearch.search.dfs.DfsPhase;
import org.elasticsearch.search.facet.FacetModule;
import org.elasticsearch.search.fetch.FetchPhase;
import org.elasticsearch.search.fetch.explain.ExplainFetchSubPhase;
import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsFetchSubPhase;
import org.elasticsearch.search.fetch.matchedqueries.MatchedQueriesFetchSubPhase;
import org.elasticsearch.search.fetch.partial.PartialFieldsFetchSubPhase;
import org.elasticsearch.search.fetch.script.ScriptFieldsFetchSubPhase;
import org.elasticsearch.search.fetch.source.FetchSourceSubPhase;
import org.elasticsearch.search.fetch.version.VersionFetchSubPhase;
import org.elasticsearch.search.highlight.HighlightModule;
import org.elasticsearch.search.highlight.HighlightPhase;
import org.elasticsearch.search.query.QueryPhase;
import org.elasticsearch.search.suggest.SuggestModule;

/**
 *
 */
public class SearchModule extends AbstractModule implements SpawnModules {

    @Override
    public Iterable<? extends Module> spawnModules() {
        return ImmutableList.of(new TransportSearchModule(), new FacetModule(), new HighlightModule(), new SuggestModule(), new FunctionScoreModule(), new AggregationModule(), new SignificantTermsHeuristicModule());
    }

    @Override
    protected void configure() {
        bind(DfsPhase.class).asEagerSingleton();
        bind(QueryPhase.class).asEagerSingleton();
        bind(SearchService.class).asEagerSingleton();
        bind(SearchPhaseController.class).asEagerSingleton();

        bind(FetchPhase.class).asEagerSingleton();
        bind(ExplainFetchSubPhase.class).asEagerSingleton();
        bind(FieldDataFieldsFetchSubPhase.class).asEagerSingleton();
        bind(ScriptFieldsFetchSubPhase.class).asEagerSingleton();
        bind(PartialFieldsFetchSubPhase.class).asEagerSingleton();
        bind(FetchSourceSubPhase.class).asEagerSingleton();
        bind(VersionFetchSubPhase.class).asEagerSingleton();
        bind(MatchedQueriesFetchSubPhase.class).asEagerSingleton();
        bind(HighlightPhase.class).asEagerSingleton();

        bind(SearchServiceTransportAction.class).asEagerSingleton();
        bind(MoreLikeThisFetchService.class).asEagerSingleton();
    }
}


text:
<?php
require_once 'Zend/Log.php';

/**
 * Wrapper class for a logging handler like {@link Zend_Log}
 * which takes a message (or a map of context variables) and
 * sends it to one or more {@link Zend_Log_Writer_Abstract}
 * subclasses for output.
 *
 * These priorities are currently supported:
 *  - SS_Log::ERR
 *  - SS_Log::WARN
 *  - SS_Log::NOTICE
 *
 * You can add an error writer by calling {@link SS_Log::add_writer()}
 *
 * Example usage of logging errors by email notification:
 *
 * SS_Log::add_writer(new SS_LogEmailWriter('my@email.com'), SS_Log::ERR);
 *
 *
 * Example usage of logging errors by file:
 *
 *	SS_Log::add_writer(new SS_LogFileWriter('/var/log/silverstripe/errors.log'), SS_Log::ERR);
 *
 *
 * Example usage of logging at warnings and errors by setting the priority to '<=':
 *
 * SS_Log::add_writer(new SS_LogEmailWriter('my@email.com'), SS_Log::WARN, '<=');
 *
 *
 * Each writer object can be assigned a formatter. The formatter is
 * responsible for formatting the message before giving it to the writer.
 * {@link SS_LogErrorEmailFormatter} is such an example that formats errors
 * into HTML for human readability in an email client.
 *
 * Formatters are added to writers like this:
 *
 * $logEmailWriter = new SS_LogEmailWriter('my@email.com');
 * $myEmailFormatter = new MyLogEmailFormatter();
 * $logEmailWriter->setFormatter($myEmailFormatter);
 *
 *
 * @package framework
 * @subpackage dev
 */
class SS_Log {

	const ERR = Zend_Log::ERR;
	const WARN = Zend_Log::WARN;
	const NOTICE = Zend_Log::NOTICE;
	const INFO = Zend_Log::INFO;
	const DEBUG = Zend_Log::DEBUG;

	/**
	 * Logger class to use.
	 * @see SS_Log::get_logger()
	 * @var string
	 */
	public static $logger_class = 'SS_ZendLog';

	/**
	 * @see SS_Log::get_logger()
	 * @var object
	 */
	protected static $logger;

	/**
	 * @var array Logs additional context from PHP's superglobals.
	 * Caution: Depends on logger implementation (mainly targeted at {@link SS_LogEmailWriter}).
	 * @see http://framework.zend.com/manual/en/zend.log.overview.html#zend.log.overview.understanding-fields
	 */
	protected static $log_globals = array(
		'_SERVER' => array(
			'HTTP_ACCEPT',
			'HTTP_ACCEPT_CHARSET',
			'HTTP_ACCEPT_ENCODING',
			'HTTP_ACCEPT_LANGUAGE',
			'HTTP_REFERRER',
			'HTTP_USER_AGENT',
			'HTTPS',
			'REMOTE_ADDR',
		),
	);

	/**
	 * Get the logger currently in use, or create a new one if it doesn't exist.
	 *
	 * @return object
	 */
	public static function get_logger() {
		if(!static::$logger) {
			// Create default logger
			static::$logger = new static::$logger_class;

			// Add default context (shouldn't change until the actual log event happens)
			foreach(static::$log_globals as $globalName => $keys) {
				foreach($keys as $key) {
					$val = isset($GLOBALS[$globalName][$key]) ? $GLOBALS[$globalName][$key] : null;
					static::$logger->setEventItem(sprintf('$%s[\'%s\']', $globalName, $key), $val);
				}
			}

		}
		return static::$logger;
	}

	/**
	 * Get all writers in use by the logger.
	 * @return array Collection of Zend_Log_Writer_Abstract instances
	 */
	public static function get_writers() {
		return static::get_logger()->getWriters();
	}

	/**
	 * Remove all writers currently in use.
	 */
	public static function clear_writers() {
		static::get_logger()->clearWriters();
	}

	/**
	 * Remove a writer instance from the logger.
	 * @param object $writer Zend_Log_Writer_Abstract instance
	 */
	public static function remove_writer($writer) {
		static::get_logger()->removeWriter($writer);
	}

	/**
	 * Add a writer instance to the logger.
	 * @param object $writer Zend_Log_Writer_Abstract instance
	 * @param const $priority Priority. Possible values: SS_Log::ERR, SS_Log::WARN or SS_Log::NOTICE
	 * @param $comparison Priority comparison operator.  Acts on the integer values of the error
	 * levels, where more serious errors are lower numbers.  By default this is "=", which means only
	 * the given priority will be logged.  Set to "<=" if you want to track errors of *at least*
	 * the given priority.
	 */
	public static function add_writer($writer, $priority = null, $comparison = '=') {
		if($priority) $writer->addFilter(new Zend_Log_Filter_Priority($priority, $comparison));
		static::get_logger()->addWriter($writer);
	}

	/**
	 * Dispatch a message by priority level.
	 *
	 * The message parameter can be either a string (a simple error
	 * message), or an array of variables. The latter is useful for passing
	 * along a list of debug information for the writer to handle, such as
	 * error code, error line, error context (backtrace).
	 *
	 * @param mixed $message Exception object or array of error context variables
	 * @param const $priority Priority. Possible values: SS_Log::ERR, SS_Log::WARN or SS_Log::NOTICE
	 * @param  mixed    $extras    Extra information to log in event
	 */
	public static function log($message, $priority, $extras = null) {
		if($message instanceof Exception) {
			$message = array(
				'errno' => '',
				'errstr' => $message->getMessage(),
				'errfile' => $message->getFile(),
				'errline' => $message->getLine(),
				'errcontext' => $message->getTrace()
			);
		} elseif(is_string($message)) {
			$trace = SS_Backtrace::filtered_backtrace();
			$lastTrace = $trace[0];
			$message = array(
				'errno' => '',
				'errstr' => $message,
				'errfile' => isset($lastTrace['file']) ? $lastTrace['file'] : null,
				'errline' => isset($lastTrace['line']) ? $lastTrace['line'] : null,
				'errcontext' => $trace
			);
		}
		try {
			static::get_logger()->log($message, $priority, $extras);
		} catch(Exception $e) {
			// @todo How do we handle exceptions thrown from Zend_Log?
			// For example, an exception is thrown if no writers are added
		}
	}

}


text:
macro(mitkMacroEmptyExternalProject proj dependencies)

  ExternalProject_Add(${proj}
    DOWNLOAD_COMMAND ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    DEPENDS
      ${dependencies}
    )
endmacro()


text:
    {{--include notification--}}
    @include('flash::message')
    {{--end include notification--}}

        {!! Form::label('name','Name ',['class' => 'control-label col-lg-2']) !!}

            {!! Form::text('name',null,['class' => 'form-control ' , 'placeholder' => 'Name','required' =>'required']) !!}

        {!! Form::label('username','Username ',['class' => 'control-label col-lg-2']) !!}

            {!! Form::text('username',null,['class' => 'form-control ','placeholder' => 'Username','required' =>'required']) !!}

        {!! Form::label('email','Email ',['class' => 'control-label col-lg-2']) !!}

            {!! Form::email('email',null,['class' => 'form-control ','placeholder' => 'Email','required' =>'required']) !!}

        {!! Form::label('role_id','Role ',['class' => 'control-label col-lg-2']) !!}

            {!! Form::select('role_id',$roles, null,['id' => 'role_id','class' => 'form-control '])!!}

        {!! Form::label('password','Password ',['class' => 'control-label col-lg-2']) !!}

                {!! Form::password('password',['class' => 'form-control ','placeholder' => 'Password']) !!}

        {!! Form::label('password_confirm','Confirmasion Password ',['class' => 'control-label col-lg-2']) !!}

            {!! Form::password('password_confirm',['class' => 'form-control ','placeholder' => 'Confirmasion Password']) !!}

        <button type="submit" class="btn bg-teal-400 pull-right fix-width btn-md m-right-20" >
              {{$textButton}}
        </button>
        <button type="reset" class="btn btn-default pull-right fix-width btn-md m-right-10" id="reset">
             Reset
        </button>

@section('costum-js')

@stop


text:
package com.shunwang.danmu.view;

import android.content.Context;
import android.graphics.Color;
import android.graphics.Rect;
import android.os.Handler;
import android.os.Message;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.LinkedList;
import java.util.Random;

/**
 * Fun:该弹幕随机批量展示
 * Created by sxx.xu on 5/18/2017.
 */

public class BarrageRelativeLayout extends RelativeLayout {

    private static final long BARRAGE_GAP_MIN_DURATION = 1000;//两个弹幕的最小间隔时间
    private static final long BARRAGE_GAP_MAX_DURATION = 2000;//两个弹幕的最大间隔时间
    public static int RANDOM_SHOW = 0x0a1;
    public static int SEQ_SHOW = 0x0a2;
    private Context mContext;
    private int maxSpeed = 10000;//速度,ms
    private int minSpeed = 5000;//速度,ms
    private int maxSize = 30;//文字大小,dp
    private int minSize = 15;//文字大小,dp
    private int totalHeight = 0;
    private int lineHeight = 0;//每一行弹幕的高度
    private int totalLine = 0;//弹幕的行数
    private Random random = new Random(System.currentTimeMillis());
    private LinkedList<String> texts = null;
    private Handler mHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            if (msg.what == RANDOM_SHOW) {
                String text = texts.get(random.nextInt(texts.size()));
                BarrageTextItem item = new BarrageTextItem(text);
                showBarrageItem(item);

                int duration = (int) ((BARRAGE_GAP_MAX_DURATION - BARRAGE_GAP_MIN_DURATION)
                        * Math.random());
                this.sendEmptyMessageDelayed(RANDOM_SHOW, duration);
            }
        }
    };

    public BarrageRelativeLayout(Context context) {
        this(context, null);

    }

    public BarrageRelativeLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);

    }

    public BarrageRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        mContext = context;
        init();
    }

    private void init() {
        texts = new LinkedList<>();
    }

    public void show(int type) {
        int duration = (int) ((BARRAGE_GAP_MAX_DURATION - BARRAGE_GAP_MIN_DURATION)
                * Math.random());
        mHandler.sendEmptyMessageDelayed(type, duration);
    }

    public void setBarrageTexts(LinkedList<String> texts) {
        this.texts = texts;
    }

    //头部第一个位置追加,最新的。
    public void addBarrageText(String text) {
        this.texts.add(0, text);
    }

    @Override
    public void onWindowFocusChanged(boolean hasWindowFocus) {
        super.onWindowFocusChanged(hasWindowFocus);
        totalHeight = getMeasuredHeight();
        lineHeight = getLineHeight();
        totalLine = totalHeight / lineHeight;
    }

    private void showBarrageItem(final BarrageTextItem item) {
        int leftMangin = this.getRight() - this.getLeft() - this.getPaddingLeft();
        LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT);
        params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
        params.topMargin = item.verticalPos;
        this.addView(item.textView, params);
        Animation anim = generateTranslateAnim(item, leftMangin);
        anim.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                item.textView.clearAnimation();
                BarrageRelativeLayout.this.removeView(item.textView);
            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }
        });
        item.textView.startAnimation(anim);
    }

    private TranslateAnimation generateTranslateAnim(BarrageTextItem item, int leftMargin) {
        TranslateAnimation anim = new TranslateAnimation(leftMargin, -item.textMeasuredWidth, 0, 0);
        anim.setDuration(item.moveSpeed);
        anim.setInterpolator(new AccelerateDecelerateInterpolator());
        anim.setFillAfter(true);
        return anim;
    }

    public float getTextWidth(BarrageTextItem item, String text, float size) {
        Rect bounds = new Rect();
        TextPaint paint = item.textView.getPaint();
        paint.getTextBounds(text, 0, text.length(), bounds);
        return bounds.width();
    }

    private int getLineHeight() {
        BarrageTextItem item = new BarrageTextItem();
        String tx = "no null data";
        item.textView = new TextView(mContext);
        item.textView.setText(tx);
        item.textView.setTextSize(maxSize);

        Rect bounds = new Rect();
        TextPaint paint = item.textView.getPaint();
        paint.getTextBounds(tx, 0, tx.length(), bounds);
        return bounds.height();

    }

    class BarrageTextItem {
        public TextView textView;
        public int textColor;
        public String text;
        public int textSize;
        public int moveSpeed;
        public int verticalPos;
        public int textMeasuredWidth;

        public BarrageTextItem() {
        }

        public BarrageTextItem(String text) {
            this.text = text;
            this.textSize = (int) (minSize + (maxSize - minSize) * Math.random());
            this.textColor = Color.rgb(random.nextInt(256), random.nextInt(256),
                    random.nextInt(256));
            textView = new TextView(mContext);
            textView.setText(text);
            textView.setTextColor(textColor);
            textView.setTextSize(textSize);
            textMeasuredWidth = (int) getTextWidth(this, text, textSize);
            moveSpeed = (int) (minSpeed + (maxSpeed - minSpeed) * Math.random());
            if (totalLine == 0) {
                totalHeight = getMeasuredHeight();
                lineHeight = getLineHeight();
                totalLine = totalHeight / lineHeight;
            }
            verticalPos = random.nextInt(totalLine) * lineHeight;
        }
    }
}