Commit Graph

95 Commits

Author SHA1 Message Date
Yev Vlasenko
63dd8f77e0 Keeping componentName as class' field 2018-02-17 19:31:10 +00:00
Noel De Martin
c36dfb3c39 #173 Implement dynamic modals functionality 2018-02-15 18:29:42 +01:00
Noel De Martin
b7fb128b5e Fix linter errors 2018-02-15 18:09:40 +01:00
David Sanders
6350c6ba5c Use type="button" for buttons on dialog 2018-02-10 07:59:51 -07:00
jjyyxx
106f5c9b10 fix a typo in comment 2018-02-01 11:08:53 +08:00
jjyyxx
ecd4e2b470 Fix a bug with toggle method
When calling hide on invisible modal with scroll set to true (though it's meaningless), the v--modal-block-scroll class will be added to body and block the UI.
2018-02-01 11:03:10 +08:00
yev
a8ecb750d1 Added maxWidth minWidth 2018-01-28 10:10:03 +00:00
Yev Vlasenko
a00f607c05 Fixed bug with resetting scroll when scrolla=true 2018-01-11 17:01:21 +00:00
Yev Vlasenko
d3198e1388 Added build target without css, started using prettier intead of linting 2017-12-28 18:27:58 +00:00
yev
d302df7310 extracting css 2017-12-27 20:35:19 +00:00
yev
2be134436f extracting css 2017-12-27 20:34:51 +00:00
Yev Vlasenko
aa388a692e Fixed focusing issue 2017-11-26 11:30:19 +00:00
Yev Vlasenko
3f68cdfdb4 Fixed bug where previously focused element (document.activeElement) neede to be unfocused. Otherwise all key and focus events where performed on that element 2017-11-26 11:00:17 +00:00
yeknava
da52d43a7a Enter key triggers default button 2017-11-26 11:24:58 +03:30
euvl
7d66dc9d8c Closing modal when ESC button pressed 2017-11-19 09:04:18 +00:00
Bo PANG
983845826b add Momentum Scrolling for scrollable 2017-11-07 17:30:05 +01:00
Bo PANG
1d3392f029 add safari support 2017-11-07 17:25:45 +01:00
Bo PANG
663b73312b Update Modal.vue 2017-11-07 15:05:00 +01:00
euvl
c58dc87f57 Added button classes for dialog 2017-10-25 10:50:50 +01:00
DaxChen
778fcff2cf check $refs.modal in observe callback 2017-10-13 12:33:21 +08:00
DaxChen
9352c2db64 add attributes:true to MutationObserver 2017-10-11 13:55:19 +08:00
euvl
553d55d392 Minor code cleaning [2] 2017-10-09 14:41:44 +01:00
euvl
4652eb0b86 Minor code cleaning 2017-10-09 14:23:21 +01:00
euvl
220573f137 Tiny refactoring of the new pull request (passing linting) 2017-10-09 14:04:12 +01:00
DaxChen
2b5b150a8d sorry for the noise, forgot to remove console.log 2017-10-06 17:04:16 +08:00
DaxChen
5103a3039c move window MutationObserver to beforeMount for SSR 2017-10-06 16:54:27 +08:00
DaxChen
e1d4993a4a fixes #60, #15: detect renderedHeight when "auto"; call "opened" after DOM changes 2017-10-06 16:23:10 +08:00
euvl
8d5316601f Fixed click event not working on dragagble modals and inputs now are not draggable 2017-09-27 10:22:50 +01:00
euvl
9bf61f5a2c Bubbling modal events to v-dialog 2017-09-27 10:10:06 +01:00
Yev Vlasenko
3ac104f569 Merge pull request #87 from arve0/vue_runtime_dep
Remove Vue runtime dependency
2017-09-16 08:50:06 +01:00
arve0
e3179625d0 Remove Vue runtime dependency
This allow the bundle to be used in jsfiddle, plnkr, jsbin, etc.,
as the bundle does not depend on Vue.

The problem lies on second line of bundle

```js
"object" == typeof exports ? exports["vue-js-modal"] = factory(require("vue")) : root["vue-js-modal"] = factory(root.vue)
```

where `factory` tries to find `root.vue`, but the official Vue bundle exports
as `root.Vue`.

Removing the runtime dependency solves this.

`Object.assign` is available in all browsers but IE:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
2017-09-13 20:30:01 +02:00
arve0
9f814fb842 Use window.innerWidth instead of body.clientWidth
Fixes pivot-x for cases where you have body smaller than document,
for example:

```html
<!DOCTYPE html>
<html>
<head>
  <style>
    html {
      background-color: white;
    }
    body {
      width: 80%;
      background-color: lightgreen;
    }
  </style>
</head>
<body>
  <script>
      document.body.innerHTML += `<pre>
        window.innerWidth is ${window.innerWidth}<br>
        document.body.clientWidth is ${document.body.clientWidth}<br>
        window.innerWidth == document.body.clientWidth: ${window.innerWidth == document.body.clientWidth}`
    </script>
  </body>
</html>
```

Fixes issue #84
2017-09-13 19:25:21 +02:00
euvl
3a8a5884c8 Added configurable clickToClose and width for v-dialog (#76) 2017-09-12 17:31:41 +01:00
euvl
b5642b8bd6 Adding overflow:hidden to the body when "scrollable" is enabled. #71 2017-09-07 15:43:58 +01:00
euvl
426f6c4955 Added touchstart to places where mousedown is called 2017-08-23 10:14:01 +01:00
euvl
d48e2772a9 Added code linting & cleaned code acording to JavaScript Standard Style 2017-08-14 14:51:28 +01:00
euvl
de592d27f4 Added comments 2017-08-14 14:32:26 +01:00
euvl
0089717a8c Added unit tests for "parser.js" and "util.js" 2017-08-07 16:07:57 +01:00
euvl
c81801ceb5 Using document.body.clientWidth instead of window.innerWidth (#58) + rebuild 2017-08-07 12:46:14 +01:00
euvl
0ea9d797cd Added Dialog component, updated examples. 2017-08-07 12:39:13 +01:00
euvl
f981168904 Added "componentName" param for optional component name (#53) 2017-07-31 15:06:13 +01:00
euvl
31ac33e206 Added support fro height: auto and scrollable flag 2017-07-24 13:35:25 +01:00
euvl
ad288e3e75 Added smart tables 2017-07-20 22:18:07 +01:00
euvl
759b3a2e31 Cleaned 2017-07-19 18:35:13 +01:00
euvl
2ae6a62f6b Added clickToClose flag that allows to block closing modal on background click (#35) 2017-07-19 18:22:20 +01:00
euvl
8df1c8934e Added reset flag that resets position/size before opening modal, cleaned code. 2017-07-16 13:03:48 +01:00
euvl
3723482757 Fixed resizing when size set with % 2017-07-16 10:32:52 +01:00
euvl
e2c85dd373 Fixed min-width, min-height with % w/h 2017-07-15 09:32:17 +01:00
euvl
be0297fc84 Added a module to tokenize strings of format number_suffix, e.g. 100px 2017-07-12 16:45:43 +01:00
onekiloparsec
22664da45f wrong default
Signed-off-by: onekiloparsec <cedric@onekilopars.ec>
2017-07-06 16:37:38 +02:00