lanes 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 423cf2958270fce5f4d1fb05fbba10fd56afbcd8
4
- data.tar.gz: e5a90b6559ebbadf4c9eb63833d0aa59e1b4d017
3
+ metadata.gz: 7af4d51495c7acfa673103570cc84a4c780a7433
4
+ data.tar.gz: 080438194e772ac2ef164c2c984f7d65f6ecae88
5
5
  SHA512:
6
- metadata.gz: 7f24e95dc672cdb9d18f6937fac870a5d216046739771d534291997369ab4488c807c92a7ad82151428b310466970085e69fd6f7c48caffd94f0a5471baa97cc
7
- data.tar.gz: f680982d7d8767bfc225b61bfd38a97e6ab11185d426e60a6c3fad7319479d7433f21bc2a2b843d24d00a32445a9e84c49f611e5cf515f06531216237cd497c6
6
+ metadata.gz: f9f04438ab66b899000c5fbe01601bd05a43c31aa7ba566793df869ecd65ac5b598e482af9468f9b223c0f7d6b1aa67e5b85fe12129010c1489493da80d74048
7
+ data.tar.gz: ced3986071d0069200a9327ebc8fba3156f0a104dafd4076d6146d50f5d5edc9c51188fd5d256e4a8f1b55b0ecbe78e0fa47ddf8e0575023ee4cec3ba40a760d
@@ -45,6 +45,9 @@ for name, func of Lanes.Vendor.dom
45
45
 
46
46
  Object.defineProperties(Lanes.lib.Dom.prototype, {
47
47
 
48
+ bounds:
49
+ get: -> @el.getBoundingClientRect()
50
+
48
51
  text:
49
52
  get: -> @el.textContent
50
53
  set: (txt) ->
@@ -264,17 +264,17 @@ class Lanes.Models.Query extends Lanes.Models.Base
264
264
  @initialField ||= this.fields.findWhere(id: "code") ||
265
265
  this.fields.findWhere(id: "visibleId") ||
266
266
  this.fields.first()
267
-
267
+ @reset(true)
268
268
  this
269
269
 
270
- reset: ->
270
+ reset: (silent = false) ->
271
271
  unless @defaultSort is false
272
272
  sort = @defaultSort or @fields.findWhere(visible: true).id
273
273
  @setSortField( @fields.findWhere(id: sort), sortAscending: @sortAscending, silent: true )
274
274
 
275
275
  @clauses.reset([
276
276
  {query: this, available_fields: @fields, field: @initialField}
277
- ])
277
+ ], {silent})
278
278
 
279
279
  setSortField: (field, options = {silent: false}) ->
280
280
  options.sortAscending ?= (if @sortField is field then !@sortAscending else true)
@@ -480,10 +480,10 @@ webpackJsonp([0],{
480
480
  var React = __webpack_require__(11);
481
481
  var Layout = __webpack_require__(150);
482
482
  var Event = __webpack_require__(272);
483
- var Label = __webpack_require__(273);
483
+ var Label = __webpack_require__(403);
484
484
  var assign = __webpack_require__(151);
485
485
  var each = __webpack_require__(182);
486
- var ReactDOM = __webpack_require__(274);
486
+ var ReactDOM = __webpack_require__(273);
487
487
 
488
488
  var IsDayClass = new RegExp('(\\s|^)(events|day|label)(\\s|$)');
489
489
 
@@ -507,7 +507,7 @@ webpackJsonp([0],{
507
507
  return { resize: false };
508
508
  },
509
509
  getBounds: function getBounds() {
510
- return ReactDOM.findDOMNode(this).getBoundingClientRect();
510
+ return ReactDOM.findDOMNode(this.refs.events || this.refs.root).getBoundingClientRect();
511
511
  },
512
512
  _onClickHandler: function _onClickHandler(ev, handler) {
513
513
  if (!handler || !IsDayClass.test(ev.target.className) || this.lastMouseUp && this.lastMouseUp < new Date().getMilliseconds() + 100) {
@@ -585,7 +585,7 @@ webpackJsonp([0],{
585
585
  if (singleDayEvents.length) {
586
586
  events.push(React.createElement(
587
587
  'div',
588
- { key: 'events', refs: 'events', className: 'events',
588
+ { key: 'events', ref: 'events', className: 'events',
589
589
  onMouseMove: onMouseMove, onMouseUp: this.onMouseUp },
590
590
  singleDayEvents
591
591
  ));
@@ -597,7 +597,8 @@ webpackJsonp([0],{
597
597
 
598
598
  return React.createElement(
599
599
  'div',
600
- _extends({}, props, {
600
+ _extends({ ref: 'root'
601
+ }, props, {
601
602
  onClick: this.onClick,
602
603
  onDoubleClick: this.onDoubleClick
603
604
  }),
@@ -621,8 +622,8 @@ webpackJsonp([0],{
621
622
  'use strict';
622
623
 
623
624
  var React = __webpack_require__(11);
625
+ var ReactDOM = __webpack_require__(273);
624
626
  var EventLayout = __webpack_require__(269);
625
-
626
627
  var IsResizeClass = new RegExp('(\\s|^)event(\\s|$)');
627
628
 
628
629
  var Event = React.createClass({
@@ -654,7 +655,7 @@ webpackJsonp([0],{
654
655
  if (!IsResizeClass.test(ev.target.className)) {
655
656
  return;
656
657
  }
657
- var bounds = this.refs.element.getBoundingClientRect();
658
+ var bounds = ReactDOM.findDOMNode(this.refs.element).getBoundingClientRect();
658
659
  var resize = void 0;
659
660
  if (ev.clientY - bounds.top < 10) {
660
661
  resize = { type: 'start' };
@@ -694,7 +695,7 @@ webpackJsonp([0],{
694
695
 
695
696
  /***/ },
696
697
 
697
- /***/ 273:
698
+ /***/ 403:
698
699
  /***/ function(module, exports, __webpack_require__) {
699
700
 
700
701
  'use strict';
@@ -1184,12 +1185,12 @@ webpackJsonp([0],{
1184
1185
  /***/ function(module, exports) {
1185
1186
 
1186
1187
  function E () {
1187
- // Keep this empty so it's easier to inherit from
1188
+ // Keep this empty so it's easier to inherit from
1188
1189
  // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
1189
1190
  }
1190
1191
 
1191
1192
  E.prototype = {
1192
- on: function (name, callback, ctx) {
1193
+ on: function (name, callback, ctx) {
1193
1194
  var e = this.e || (this.e = {});
1194
1195
 
1195
1196
  (e[name] || (e[name] = [])).push({