quick_script 0.5.12 → 0.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module QuickScript
2
- VERSION = "0.5.12"
2
+ VERSION = "0.5.14"
3
3
  end
@@ -18,7 +18,7 @@
18
18
  ko.bindingHandlers.handleEnter =
19
19
  init : (element, valueAccessor, bindingsAccessor, viewModel) ->
20
20
  $(element).keypress (ev)->
21
- if (ev.keyCode == 13)
21
+ if (ev.keyCode == 13 && !ev.shiftKey)
22
22
  action = valueAccessor()
23
23
  val = bindingsAccessor().value
24
24
  val($(element).val())
@@ -688,7 +688,7 @@ class @View
688
688
  @has_error = ko.computed (-> @error().length > 0), this
689
689
  @view = null
690
690
  @task = ko.observable(null)
691
- @transition = {type : 'fade', opts : {'slide_left' : ko.observable(0)}}
691
+ @transition = {type : 'fade', opts : {'slide_left' : ko.observable(0), 'working' : ko.observable(false)}}
692
692
  @init()
693
693
  @setupViewBox()
694
694
  show : ->
@@ -703,6 +703,9 @@ class @View
703
703
  left = @getViewBoxIndex(val) * @transition.opts.width * -1
704
704
  #console.log(left)
705
705
  @transition.opts.slide_left(left)
706
+ clearTimeout(@transition.opts.wtid) if @transition.opts.wtid?
707
+ @transition.opts.working(true)
708
+ @transition.opts.wtid = setTimeout (=> @transition.opts.working(false)) , 1000
706
709
  load : ->
707
710
  addView : (name, view_class, tpl) ->
708
711
  @views[name] = new view_class(name, this)
@@ -869,7 +872,7 @@ class @AppView extends @View
869
872
  <div data-bind="style : {width : transition.opts.width + 'px', height : transition.opts.height + 'px', overflowX : 'hidden', overflowY : 'hidden'}">
870
873
  <div class='view-slider' data-bind="style : {width : ((viewCount()+1) * transition.opts.width) + 'px', height : transition.opts.height + 'px', clear : 'both', marginLeft : transition.opts.slide_left() + 'px', 'position' : 'relative'}">
871
874
  <div data-bind='foreach : viewList()'>
872
- <div data-bind="template : { name : getViewName }, attr : {id : templateID}, style : {width : owner.transition.opts.width + 'px', height : owner.transition.opts.height + 'px', left : ($index() * owner.transition.opts.width) + 'px', 'position' : 'absolute', overflowY : 'auto'}"></div>
875
+ <div data-bind="template : { name : getViewName }, attr : {id : templateID}, style : {width : owner.transition.opts.width + 'px', height : owner.transition.opts.height + 'px', left : ($index() * owner.transition.opts.width) + 'px', 'position' : 'absolute', overflowY : 'auto'}, visible : is_visible() || owner.transition.opts.working()"></div>
873
876
  </div>
874
877
  </div>
875
878
  <div style='clear: both;'></div>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quick_script
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 12
10
- version: 0.5.12
9
+ - 14
10
+ version: 0.5.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alan Graham
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-22 00:00:00 Z
18
+ date: 2012-07-03 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Framework for single-page web applications