quick_script 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module QuickScript
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
@@ -130,17 +130,23 @@ Overlay.add = (vm, tmp, options, cls) ->
130
130
  template = tmp
131
131
  cls = cls || ''
132
132
  options = {} if !options?
133
- options['z-index'] = Overlay.instance.zindex + 10
134
- $('body').prepend("<div class='backdrop' id='backdrop-#{id}' style='z-index: #{(Overlay.instance.zindex + 9)}'></div><div id='overlay-" + id + "' class='overlay'><img class='overlay-close' src='/assets/remove.png' data-bind='click : hideOverlay'/><div class='content' data-bind=\"template: '" + template + "'\"></div></div>")
135
- $('#overlay-' + id).css(options)
136
- $('#overlay-' + id).addClass(cls)
137
- $('#overlay-' + id).css({'margin-left' : -1 * $('#overlay-' + id).width() / 2})
138
- $('.overlay .content').css({'max-height' : ($(window).height() - 100)})
139
- $('#backdrop-' + id).click =>
140
- console.log('backdrop clicked.')
141
- Overlay.remove(id)
142
- $('#overlay-' + id).koBind(vm)
143
- Overlay.instance.zindex = Overlay.instance.zindex + 10
133
+ #options['z-index'] = Overlay.instance.zindex + 10
134
+ $('body').prepend("<div id='overlay-" + id + "' class='modal hide fade'><button class='close' data-bind='click : hideOverlay'>x</button><div class='content' data-bind=\"template: '" + template + "'\"></div></div>")
135
+ #$('#overlay-' + id).css(options)
136
+ #$('#overlay-' + id).addClass(cls)
137
+ #$('#overlay-' + id).css({'margin-left' : -1 * $('#overlay-' + id).width() / 2})
138
+ #$('.overlay .content').css({'max-height' : ($(window).height() - 100)})
139
+ #$('#backdrop-' + id).click =>
140
+ #console.log('backdrop clicked.')
141
+ #Overlay.remove(id)
142
+ setTimeout ->
143
+ $('#overlay-' + id).koBind(vm)
144
+ $('#overlay-' + id).modal('show')
145
+ $('#overlay-' + id).on 'hidden', ->
146
+ $('#overlay-' + id).koClean()
147
+ $('#overlay-' + id).remove()
148
+ , 100
149
+ #Overlay.instance.zindex = Overlay.instance.zindex + 10
144
150
 
145
151
  Overlay.dialog = (msg, opts) ->
146
152
  vm =
@@ -180,9 +186,7 @@ Overlay.confirm = (msg, opts) ->
180
186
  $('#overlay-confirm').slideDown 'fast'
181
187
 
182
188
  Overlay.remove = (id) ->
183
- $('#overlay-' + id).koClean()
184
- $('#overlay-' + id).remove()
185
- $('#backdrop-' + id).remove()
189
+ $('#overlay-' + id).modal('hide')
186
190
 
187
191
  class @TimeLength
188
192
  constructor : (@date1, @date2)->
@@ -64,6 +64,12 @@
64
64
  width: 40px
65
65
  z-index: inherit
66
66
 
67
+ .modal
68
+ button.close
69
+ +p-abs
70
+ top: 5px
71
+ right: 10px
72
+
67
73
  .notify
68
74
  +padded
69
75
  +p-fix
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 1
9
- version: 0.9.1
8
+ - 2
9
+ version: 0.9.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alan Graham
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-09-18 00:00:00 -04:00
17
+ date: 2012-09-19 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies: []
20
20