ende 0.4.8 → 0.4.9

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: d16802734857d0dd2c41903be9133eae36249ab9
4
- data.tar.gz: 56497874bf1b5d72b063cb83cb794f726efed3a2
3
+ metadata.gz: 5750c3b93631d687a3ba567a7d59e436f7d104d7
4
+ data.tar.gz: 886aed4538bf6c0c00cc8cecef731ab2694bfa96
5
5
  SHA512:
6
- metadata.gz: 6155c21110a59cbd24160b74c86f5c49c90413387d3b18251a329540829379c08bce9bca21ec718b2a8dd78a479d6a6528a3ab4111eee1570fd5820031c5d00b
7
- data.tar.gz: 2f28469461acf1e97c2a6b4aa6061012658917033e912a431025939bbf2de2bc2bc3ded0e2c714ebeb40f220b3d33015e6f99ff8b5d73340b7cc5a2bf53de315
6
+ metadata.gz: 152db46650fea525dbb0784bfd0d86dab57780a33eeabee32e7a2016739551fa4f19e8fb1aefbdbd79147eeb614e29e0bf195e86015f6df6cbe617dada654810
7
+ data.tar.gz: c3ff7648f82038b397bb3734f9c20ca382a486e243b7ed1a689ee452ba5e7ba2de878376f0b06c4a4c7c0d99d1ee42cb82bee3cc08fef9b851577324ed795a96
@@ -2,7 +2,7 @@
2
2
 
3
3
  define 'aura/extensions/mask',
4
4
 
5
- version: '0.1.1'
5
+ version: '0.1.2'
6
6
 
7
7
  require:
8
8
  paths:
@@ -27,7 +27,6 @@ define 'aura/extensions/mask',
27
27
  with_aura = 'jquery.mask_numeric_extensions'
28
28
  require with_aura
29
29
 
30
-
31
30
  mask = (selector, mask, options) -> $(selector).inputmask mask, options
32
31
 
33
32
  sandbox.ui = sandbox.util.extend sandbox.ui, mask: mask
@@ -73,3 +72,7 @@ define 'aura/extensions/mask',
73
72
  mask : '(99) 9999[9]-9999'
74
73
 
75
74
 
75
+ afterAppStart: ->
76
+ @extend()
77
+
78
+
@@ -14,4 +14,4 @@ define 'aura/extensions/platform', ->
14
14
  application.core = Object.create application.core, descriptors
15
15
  application.sandbox = Object.create application.sandbox, descriptors
16
16
 
17
- # TODO copy other properties to the main application
17
+ # TODO copy other properties to the main application
@@ -44,11 +44,11 @@ define 'aura/extensions/routes', (routes) ->
44
44
 
45
45
  #-- If we land on the page with a hash value and history is enabled, redirect to the non-hash page
46
46
  if ( window.location.hash.indexOf('#!') != -1 && history )
47
- window.location.href = window.location.hash.replace('#!', '')
47
+ return window.location.href = window.location.hash.replace('#!', '')
48
48
 
49
49
  #-- If we land on the page with a path and history is disabled, redirect to the hash page
50
50
  else if ( '/' != window.location.pathname && !history )
51
- window.location.href = '/#!' + window.location.pathname
51
+ return window.location.href = '/#!' + window.location.pathname
52
52
 
53
53
 
54
54
  #-- Process the route
@@ -0,0 +1,39 @@
1
+ 'use strict'
2
+
3
+ define 'aura/extensions/screening', ->
4
+
5
+
6
+ screener =
7
+ versionalize: (string) ->
8
+ version = []
9
+ version.push +member for member in string.split '.'
10
+ version
11
+
12
+ test: ->
13
+ return @result if @result
14
+
15
+ ua = navigator.userAgent
16
+ M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*([\d\.]+)/i) || [];
17
+
18
+ if /trident/i.test M[1]
19
+ tem = /\brv[ :]+(\d+(\.\d+)?)/g.exec(ua) || []
20
+ return @result = alias: 'MSIE', version: @versionalize tem[1]
21
+
22
+ M = if M[2] then [M[1], M[2]] else [navigator.appName, navigator.appVersion, '-?']
23
+ M[2] = tem[1] if (tem = ua.match(/version\/([\.\d]+)/i)) != null
24
+
25
+ return @result = alias: M[0], version: @versionalize M[1]
26
+
27
+ screen: ->
28
+ window.location = '/screened'
29
+
30
+ version: '0.1.0'
31
+ initialize: ->
32
+ browser = screener.test()
33
+ screener.screen() if browser.alias == 'MSIE' and browser.version[0] < 9
34
+
35
+ afterAppStart: (application) ->
36
+ application.core.screener = screener
37
+
38
+
39
+
@@ -11,6 +11,7 @@ requirejs.config
11
11
  # probably create a undefined plug-in for component builder
12
12
  exports: 'require.modules.seminovos/vendor/loaded'
13
13
  deps: ['ende_build']
14
+
14
15
  ende_build:
15
16
  exports: 'require.register'
16
17
 
@@ -21,7 +22,10 @@ requirejs.config
21
22
  define 'jquery' , ['config/load_components'], ->
22
23
  window.jQuery = window.$ = require 'component-jquery'
23
24
 
24
- define 'modernizr' , ['config/load_components'], -> require 'modernizr'
25
+ define 'modernizr' , ['config/load_components'], ->
26
+ require 'modernizr'
27
+ window.Modernizr
28
+
25
29
  # TODO define 'underscore', ['config/load_components'], -> require 'lodash'
26
30
 
27
31
  # TODO figure out how to use rjs optmizer to include component builds
@@ -1,8 +1,10 @@
1
- define ->
1
+ 'use strict';
2
+
3
+ define
2
4
 
3
5
  type: 'Base'
4
6
 
5
- version: '0.1.1'
7
+ version: '0.1.2'
6
8
 
7
9
  options:
8
10
  autoload: true
@@ -70,14 +72,24 @@ define ->
70
72
 
71
73
  # Executed upon successfully loaded
72
74
  loaded: (response) ->
73
- # Will also initialize sandbox!
75
+ # Will also initialize sandbox in this element, also firing any
76
+ # other widget in the responded html
74
77
  @html response
75
78
 
79
+ # Executed upon failure loaded
76
80
  failed: (xhr) ->
77
81
  switch xhr.status
82
+ # abort
83
+ when 0
84
+ # TODO default abort message
85
+ @sandbox.emit "content.#{@identifier}.loading_aborted"
86
+ # forbidden
78
87
  when 401
88
+ # TODO default forbidden message
79
89
  @sandbox.emit "content.#{@identifier}.loading_unauthorized"
80
90
  else
91
+ @sandbox.emit "content.#{@identifier}.loading_failed"
92
+
81
93
  # TODO better debugging code location
82
94
  if @sandbox.debug.enabled
83
95
  html = "<h2>Content Widget: Failed to load Content. Click to retry.</h2>"
@@ -94,6 +106,7 @@ define ->
94
106
 
95
107
  @html html
96
108
 
109
+ # Always executed after the load temptative
97
110
  ended: ->
98
111
  @$el.removeClass "loading"
99
112
  @$el.addClass "idle"
data/lib/ende/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ende
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ende
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heitor Salazar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-10 00:00:00.000000000 Z
11
+ date: 2014-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,7 @@ files:
80
80
  - lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
81
81
  - lib/assets/javascripts/aura/extensions/rivets/formatters.js.coffee
82
82
  - lib/assets/javascripts/aura/extensions/routes.js.coffee
83
+ - lib/assets/javascripts/aura/extensions/screening.js.coffee
83
84
  - lib/assets/javascripts/aura/extensions/states.js.coffee
84
85
  - lib/assets/javascripts/aura/extensions/widget/eventable.js.coffee
85
86
  - lib/assets/javascripts/aura/extensions/widget/lifecycleable.js.coffee