Commit 11550fd9 authored by Laura Schlimmer's avatar Laura Schlimmer
Browse files

updated components

parent 30a2085f
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@
      font-size: 0.875rem;
    }

    fn-input-time {
    fn-timeinput {
      margin: 7px auto;
      display:block;
    }
@@ -63,7 +63,6 @@
      font-size: 1em;
    }


    table th {
      width: 25px;
      height: 28px;
@@ -139,7 +138,6 @@

          //timeInput is optional and set by data-time-select attribute
          if (base.hasAttribute('data-time-select')) {
            console.log("render time input");
            base.renderTimeInput();
          }

@@ -148,6 +146,8 @@
          var selected_month = selected_date.getMonth();

          base.renderCalendar(selected_year, selected_month);
        } else {
          base.resetDatepicker();
        }

      }, false);
@@ -186,7 +186,7 @@

    this.renderTimeInput = function() {
      var widget = this.shadowRoot.querySelector("#datepicker_widget");
      var time_input = document.createElement("fn-input-time");
      var time_input = document.createElement("fn-timeinput");
      var selected_date = this.getSelectedDate();

      if (this.hasAttribute('data-size')) {
@@ -198,7 +198,7 @@
      widget.appendChild(time_input);
      var base = this;

      time_input.addEventListener('fn-input-time-submit', function() {
      time_input.addEventListener('fn-timeinput-submit', function() {
        base.onSelect();
      }, false);
    }
@@ -424,9 +424,9 @@
      var hours = "00";
      var minutes = "01";
      if (this.hasAttribute('data-time-select')) {
        var time_input = this.shadowRoot.querySelector("fn-input-time");
        hours = time_input.getAttribute('data-hours-value');
        minutes = time_input.getAttribute('data-minutes-value');
        var time_values = this.shadowRoot.querySelector("fn-timeinput").getValues();
        hours = time_values.hours;
        minutes = time_values.minutes;
      }

      /* fallback for time inputs */
+10 −0
Original line number Diff line number Diff line
@@ -21,6 +21,16 @@
      <fn-dropdown-item>Max</fn-dropdown-item>
      <fn-dropdown-item>Median</fn-dropdown-item>
    </fn-dropdown>
    <fn-dropdown data-style="small" style="margin-bottom: 30px;">
      <fn-dropdown-header >Rollup</fn-dropdown-header>
      <fn-dropdown-item>Value</fn-dropdown-item>
      <fn-dropdown-item>Count</fn-dropdown-item>
      <fn-dropdown-item>Sum</fn-dropdown-item>
      <fn-dropdown-item>Min</fn-dropdown-item>
      <fn-dropdown-item>Max</fn-dropdown-item>
      <fn-dropdown-item>Median</fn-dropdown-item>
    </fn-dropdown>


    <h3><i>Example 2 &raquo;</i> Input Like</h3>
    <fn-dropdown data-style="input">
+17 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@
      font-style: normal;
      text-align: center;
      width: auto;
      margin: 0 0 0 1em;
      margin: 0 0 0 0.5em;
    }


@@ -264,6 +264,22 @@
      box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.08);
    }

    /*--------------
      Sizes
    ---------------*/
    #dropdown_ui {
      font-size: 1rem;
    }

    #dropdown_ui.small {
      font-size: 0.875rem;
    }

    #dropdown_ui.small i.icon {
      margin: 0 0 0 .2em;
    }


     /*--------------
      Small Input like
    ---------------*/
+10 −10
Original line number Diff line number Diff line
@@ -90,11 +90,11 @@

    this.forElement = function(elem) {
      var page = elem.getAttribute('data-page');
      page = (page == null)? 0 : parseInt(page, 10);
      page = (page == null)? 1 : parseInt(page, 10);
      this.current_page = page;

      var end = elem.getNumberOfItems();
      end = (end == null)? 0 : parseInt(end, 10);
      end = (end == null)? 1 : parseInt(end, 10);
      this.end = end;

      var per_page = elem.getAttribute('data-per-page');
@@ -109,11 +109,11 @@

    this.init = function() {
      var page = this.getAttribute('data-current-page');
      page = (page == null)? 0 : parseInt(page, 10);
      page = (page == null)? 1 : parseInt(page, 10);
      this.current_page = page;

      var end = this.getAttribute('data-last-item');
      end = (end == null)? 0 : parseInt(end, 10);
      end = (end == null)? 1 : parseInt(end, 10);
      this.end = end;

      var per_page = this.getAttribute('data-per-page');
@@ -126,7 +126,7 @@
      var per_page = this.per_page;
      var end = this.end;

      var start = (current_page) * per_page + 1;
      var start = (current_page - 1) * per_page + 1;
      var current_end = start + per_page - 1;

      if (current_end > end) {
@@ -142,27 +142,27 @@
      var forward_tooltip = this.shadowRoot.querySelector(".forward");
      var base = this;

      var pages = Math.ceil((this.end -1) / this.per_page);
      var pages = Math.ceil(this.end / this.per_page);

      backward_tooltip.onclick = function() {
        var current_page = base.current_page;
        if (current_page > 0 || base.hasAttribute('data-circling')) {
          var new_page = ((current_page + pages) % (pages + 1));
          var new_page = ((current_page + pages) % pages);
          cb(new_page, caller);
          base.current_page = new_page;
          base.current_page = new_page + 1;
          base.renderTitle();
        }
      };

      forward_tooltip.onclick = function() {
        var current_page = base.current_page;
        if (current_page < pages - 1) {
        if (current_page < pages) {
          base.current_page = current_page + 1;
          base.renderTitle();
          cb(current_page, caller);
        } else {
          if (base.hasAttribute('data-circling')) {
            base.current_page = 0;
            base.current_page = 1;
            base.renderTitle();
            cb(0, caller);
          }
+4 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
      line-height: 1.33;
      width: 100%;
      /*height: 100%;*/
      padding: 6px 12px;
      padding: 0.67861em 1em;
      color: #555;
      background-color: #fff;
      background-image: none;
@@ -71,10 +71,10 @@
    ul {
      position: absolute;
      top: 100%;
      margin: -8px 1px;
      margin: -4px -1px;
      z-index: 1000;
      display: none;
      width: auto;
      width: inherit;
      min-width: -webkit-calc(100% + 2px); */
      min-width: calc(100% + 2px);
      padding: 5px 0;
@@ -89,6 +89,7 @@
      border-radius: 4px;
      -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
      box-shadow: 0 6px 12px rgba(0,0,0,.175);
      overflow: hidden;
    }

    li {
Loading